Computer Science, asked by shrivastavadevansh75, 4 months ago

Write a program to input a number and find the sum of all even digits. in java​

Answers

Answered by Anonymous
2

Explanation:

Java Program to Find Sum of Even Digits in a Given Number

1. Take a number.

2. Declare a variable evenDigitSum to store the 3. sum value and initialize it with 0.

4. Find the last digit of the number.

5. Check that the last digit is even or not.

6. If it even then adds it to evenDigitSum variable, else go to next step.

7. Remove the last digit of the number.

Similar questions