program to enter a number and print the sum of even digits present in the number
Answers
Answered by
0
Answer:
a=1 b=2 c=a+b print c
Explanation:
please don't care about the brackets
Answered by
0
In which language? I will write in Python.
print ("Write intergers only:\n" )
a = input()
def sumofevendigits (number) :
h = []
b = 0
for digit in number:
if int(digit) % 2 == 0:
h.append(int(digit))
for e in h:
b+=e
return b
print(sumofevendigits(a))
hope it helps.
Similar questions