Saved Bookmarks
| 1. |
Write a program to find the sum of all digits of the given number. |
|
Answer» n = inputfEnter the number”) rev=0 while (n>0): a=n%10 sum = sum + a n=n/10 print “Sum of digits=”,sum |
|