HomeC program to find sum of all the digits of a number. c program to add all the digits of a number. byComputer Programming and Technology. •3:11 PM 0 #include<stdio.h> #include<conio.h> void main() { int n,sum=0,m; printf("Enter a number:"); scanf("%d",&n); while(n>0) { m=n%10; sum=sum+m; n=n/10; } printf("Sum is=%d",sum); return 0; } Output: Enter a number:654 Sum is=15 Tags: C program to find sum of all the digits of a number. C programming ermskuthar manncsemanjeet Facebook Twitter