-->
当前位置:首页 > 题库

PROGRAMMING:For loop exercise: print a specific range of square root table, output in the specified format.

Luz5年前 (2021-05-10)题库431
Read in a positive integer x within 10 (the variable name in the program is not necessarily x, self-defined), and output the square root table of all numbers from 1 to X.
###Input format:
A positive integer x within 10.
###Output format:
Output the square root of 1 to X in one line, taking 2 decimal places. Note that there are no commas or spaces after the last value of the output.
###Input example:
```in
five
```
###Output example:
The corresponding output is given here. For example:
```out
sqrt(1)=1.00,sqrt(2)=1.41,sqrt(3)=1.73,sqrt(4)=2.00,sqrt(5)=2.24
```







answer:If there is no answer, please comment