Write a program that reads in the radius of a circle as an integer and prints the circle’s diameter, circumference and area. Use the constant value 3.14159 for π. Do all calculations in output statements.
Write a program that reads in the radius of a circle as an integer and prints the circle’s diameter, circumference and area. Use the constant value 3.14159 for π. Do all calculations in output statements.
Input an integer as the radius of a circle
Prints the circle’s diameter, circumference and area
输入
1
输出
Diameter is 2 Circumference is 6.28318 Area is 3.14159