/* PROGRAM TO FIND THE SUM OF 5 DIGITS IN A 5-DIGIT NUMBER*/
#include<stdio.h>
#include<conio.h>
main()
{
long int no;
int a,n;
int sum=0;
printf("Enter 5 digit number\n");
scanf("%ld",&no);
a=no%10;
sum=sum+a; /* sum of one digit*/
n=no/10;
a=n%10;
sum=sum+a;/* sum of two digit */
n=n/10;
a=n%10;
sum=sum+a;/* sum of three digit */
n=n/10;
a=n%10;
sum=sum+a; /* sum of four digits*/
n=n/10;
a=n%10;
sum=sum+a; /* sum of five digits */
printf("sum=%d\n",sum);
getch();
}


