Computer Science, asked by Anonymous, 9 months ago

Write a java program to find the sum of odd and even digits of a number.
Useless answers will be reported. ​

Answers

Answered by anindyaadhikari13
6

Answer:

See this.

Explanation:

I hope this will help you..Please mark this answer as the brainliest.

10 thanks + follow = inbox ✌✌

Attachments:
Answered by BrainlyProgrammer
6

Answer:

int n=Sc.nextInt();

while(n!=0)

{

d=n%10;

if(d%2==0)

s+=d;

else

k+=d;

n/=10;

}

System.out.println("Sum of odd"+k);

System.out.println("Sum of even"+d);

Similar questions