A program to print the sum of all digits of a number given by the user.
Answers
Answered by
40
Answer:
Let's see the sum of digits program in C.
- #include<stdio.h>
- int main()
- {
- int n,sum=0,m;
- printf("Enter a number:");
- scanf("%d",&n);
- while(n>0)
- {
Similar questions