107 284
Assignments Done
97.9%
Successfully Done
In March 2023

# Answer to Question #1180 in C++ for manaal

Question #1180
A digital river is the sequence of number where the number following is n+ the sum of its digits for example 12345=12345+15=12360
If the first number of digital rivers is k we call the river k for example river 480 is the sequence { 480,492,507,519…} and river 483 is the sequence {483,493,519……..}normal streams and river can meet and the same is true for a digital rivers share the same value. For example river 480 meets river 483 at 519 meets river 507 at 507 and never meet river 481
Every digital river will eventually meet river 1, river 3, or river 9
Write a program which inputs a single integer n (1<=n<=16384) and outputs the value where river n meets one of the above three rivers
1
2011-01-18T15:47:09-0500
Your question requires a lot of work to do and cannot be done for free. Submit it as an assignment to the control panel and our experts will assist you.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!