1# include <stdio.h>
2int sum(int number);
3int main
4{
5 int n;
6 int a;
7 printf("enter a number");
8 scanf("%d,&n);
9 a=sum(n);
10 printf("sum=%d",a);
11 }
12int sum(int number)
13{
14 if (number==0)
15 return 0;
16 return(number%10+sum(number/10);
17 }