Module: (C++) Nested loops


Problem

8 /8


*Root to root

Problem

For a given natural number m, calculate:

\(x =\sqrt{m+\sqrt{2 \cdot m+...+\sqrt{n \cdot m + . ..}}}\).
Input data 
The input to the program is a natural number m<=100.
 
Output 
Print the value of the specified expression up to 6 significant digits after the decimal point (it is known that this expression consists of an infinite number of nested roots, for all specified m values, of course).
 
Examples
# Input Output
1 2 2.158477