netoops blog

Sunday, 25 August 2013

Sum_of_Digit

#include <stdio.h>
#include <conio.h>

void main()
{
long int s = 0,d;
clrscr();
printf ("ENTER ANY NUMBER :");
scanf ("%ld",&n);
while (n)
{
d = n % 10;
s = s + d;
n /= 10;
}
printf ("SUM OF DIGIT IS %d ",s);
getch();
}

Tech Knowledege
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

0 comments :

Post a Comment

 
Subscribe For Free Updates!

We'll not spam mate! We promise.

Become Our Fan on Social Sites!