Computer Science, asked by ravikumar8959, 1 month ago

program to enter a number and print the sum of even digits present in the number ​

Answers

Answered by Anonymous
0

Answer:

a=1 b=2 c=a+b print c

Explanation:

please don't care about the brackets

Answered by udayphrj
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