#include<stdio.h>
#include<conio.h>
void main()
{
int rem,sum,n;
sum=0;
printf("\n\n Enter Any number: ");
scanf("%d",n);
while(n>0)
{
rem=n%10;
sum=sum+rem;
n=n/10;
}
printf("\n\nThe sum of the number is=%d",sum);
getch();
}
#include<conio.h>
void main()
{
int rem,sum,n;
sum=0;
printf("\n\n Enter Any number: ");
scanf("%d",n);
while(n>0)
{
rem=n%10;
sum=sum+rem;
n=n/10;
}
printf("\n\nThe sum of the number is=%d",sum);
getch();
}