Sum of digits program in C
C program to sum each digit: We can write the sum of digits program in c language by the help of loop and mathematical operation only.
Sum of digits algorithm
To get sum of each digits by c program, use the following algorithm:
Let's see the sum of digits program in C.
Enter a number:654 Sum is=15
Enter a number:123 Sum is=6