Ответ:
a = int(input())
even = 0
odd = 0
while a > 0:
if a % 2 == 0:
even += 1
else:
odd += 1
a = a // 10
print("Четных: %d, нечетных: %d" % (even, odd))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
a = int(input())
even = 0
odd = 0
while a > 0:
if a % 2 == 0:
even += 1
else:
odd += 1
a = a // 10
print("Четных: %d, нечетных: %d" % (even, odd))