answersLogoWhite

0

void main() { int num,r,sum=0; clrscr(); printf("enter the number\n"); scanf("%d",&num); while(num!=0) { r=num%10; sum=sum+r; num=num/10 } printf("The sum of individual digit of given number is=%d",sum); getch() }

User Avatar

Wiki User

16y ago

Still curious? Ask our experts.

Chat with our AI personalities

ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
BeauBeau
You're doing better than you think!
Chat with Beau
SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve

Add your answer:

Earn +20 pts
Q: Sum of individual digits of number?
Write your answer...
Submit
Still have questions?
magnify glass
imp