In this page I have written the program that calculates the sum successively until the sum reduces to a single digit. For this I have used nested loop as while and do while. For example, 12345=>1+2+3+4+5=>15=>1+5=>6. For more information have a look for the source code and the output below:
The output of the program is:
The main source code for the above program is:
0 comments :
Post a Comment