Thread: problem in C++
View Single Post
  #1  
Old 08-25-2010, 08:53 AM
C++ C++ is offline
Senior Member
 
Join Date: Jun 2009
Posts: 18,248
Default problem in C++

Assuming that we enter the integer value is 5689798. Summing up the digits gives 5+6+8+9+7+9+8+8 = 58 that contains more than one digit, so we repeat the process: 5+8 = 13. we repeat until we got one digit: 1+3 = 4 . The final answer is 4. I don't know how to isolate each digit in order to add...
__________________
C++
domain name forum
Reply With Quote