void main()
{
int n;
clrscr();
printf("enter the value of n:\t");
scanf("%d",&n);
printf("\nthe sum of the digits of the number is: %d",dig(n));
getch();
}
dig(int n)
{
if (n==0) return 0;
else return n%10+dig(n/10);
}