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

PROGRAMMING:Calculation related to circle

Luz5年前 (2021-05-10)题库426
###Task description
The radius of the circle is given, and the diameter, perimeter and area of the circle are calculated.
###Input format:
The input contains a real number R (0 < R < = 10000) representing the radius of the circle.
###Output format:
The output line contains three numbers, representing the diameter, perimeter and area of the circle respectively. The numbers are separated by a space,
###Input example:
```in
three
```
###Output example:
```out
6.0000 18.8495 28.2743
```
###Tips
If the radius of the circle is r, then the diameter, perimeter and area of the circle are 2 * r, 2 * pi * r and pi * r * r respectively, where pi = 3.14159.
You can use printf ("%. 4lf",...) to reserve 4 decimal places.
Note: this topic is selected from openjudge website http://noi.openjudge.cn/ch0103/09/ .







answer:If there is no answer, please comment