kindly write a program in turbo c.

September 22, 2010 at 09:54:07
Specs: Windows XP
Write a program to take three digit number. Find the addition of all the digits.

See More: kindly write a program in turbo c.

Report •

September 22, 2010 at 11:01:05
Dear Program,

If I gave you a three digit number, could you please find the sum of their digits?

Ima Student (of Turbo C)


All kidding aside, if it were me, I read this beast as a string, and then use sscanf (or stringstream) to convert each digit, and sum them.

I have no aspiration for preaching. ;-)

Report •
Related Solutions

Ask Question