answersLogoWhite

0

Void main ()

{

Int n, r, s = 0 ;

Printf (" Enter the number")

Scanf ("% d", & n);

While (n! = 0)

{

r = n%/10;

s = s+r;

n = n/10;

s = s+r;

n = n/10

}

Printf ("sun of the dijit of a no. is % d; s)

User Avatar

Wiki User

10y ago

Still curious? Ask our experts.

Chat with our AI personalities

FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran
JudyJudy
Simplicity is my specialty.
Chat with Judy
SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve

Add your answer:

Earn +20 pts
Q: Write a program defind the sum of dijit of a number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering