BEGIN-3 area of a circle

Description of the problem
to a given radius r of the circle, the area of circular.
Input format
input contains an integer r, represents the radius of the circle.
Output format
output line, comprising a real number, rounded to 7 after the decimal point indicates the area of a circle.
Description: In this problem, the input is an integer, but the output is a real number.

For the problem of real output, be sure to look at the requirements of real output, such as required in this question after seven decimal places, then your program must be strictly output seven decimal places, too much or too little output of decimal places are not , it will be considered an error.

The real question is if the output is not specified, rounding is performed by rounding.

Input Sample
4
Sample Output
50.2654825
data size and Conventions
1 <= r <= 10000.
Prompt
this question of high precision, please note that the value of π should take a more accurate value. You can use constants to represent π, for example PI = 3.14159265358979323, mathematical formulas may be used to seek π, such as PI = atan (1.0) * 4 .
C ++ code:

#include<cstdio>
int main(){
	int n;
	scanf("%d",&n);
	double PI=3.14159265358979323;
	printf("%.7lf",PI*n*n);
	return 0;
}
Published 84 original articles · won praise 5 · Views 4762

Guess you like

Origin blog.csdn.net/u014424618/article/details/105308099