count = 0
number = int(input("Enter a number: "))
if number == 0:
count += 1
else:
while number > 0:
if number % 10 % 2 == 0:
number = number // 10
print("Total number of even digits:", count)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
count = 0
number = int(input("Enter a number: "))
if number == 0:
count += 1
else:
while number > 0:
if number % 10 % 2 == 0:
count += 1
number = number // 10
print("Total number of even digits:", count)