Write a program to sum the digits of a number in C Language

Write a program to sum the digits of a number in C Language.

program to sum the digits of a number  1
program to sum the digits of a number 

main()
{
int n, s=0, m;
printf("Enter the Number");
scanf("%d",&n);
while(n>0)
{
m=n%10;
s=s+m;
n=n/10;
}
printf("Sum of digits = %d",s);
}