write a program to find and display the sum of even digits of a number
Answers
Answered by
0
Answer:
Java Program to Find Sum of Even Digits in a Given Number
Take a number.
Declare a variable evenDigitSum to store the sum value and initialize it with 0.
Find the last digit of the number.
Check that the last digit is even or not.
If it even then adds it to evenDigitSum variable, else go to next step.
Remove the last digit of the number
Similar questions