Pie Are Squared - Easy Problems - Solution to Toph.co Online Judge Problem

Pie Are Squared

Limits 1s, 512 MB

Given the radius of a circle, calculate and print its area.
The area of a circle can be computed using the following formula:
A=πr2 A = \pi r^2
For pi, you can use 3.141592653589793, or acos(-1).

Input

The input will contain one floating point number r (r < 2000).

Output

Print the area of the circle (accurate to 10-4).

Sample

InputOutput
2
12.5663706144
 
 
Solution: 
 
 
#include<stdio.h>
#include<math.h>

int main()
{
    double r;
    scanf("%lf",&r);

    printf("%.10lf\n",M_PI*r*r);
}