int p=3456,s=0; while(p>100) { int r=p%10; s=s+r; p=p/10; } System.out.print(s);
Answers
Answered by
0
Answer:
Output will be:
18
This is a a program which gives the sum of each digits.
I hope you find it useful... If you have any query do comment, I will try to solve it...
Answered by
0
Answer:
hii dear how are u
Explanation:
nice to meet u
Similar questions