Toph easy problem(Pie Are Squared)



Question:


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 = \pi r^2

Input

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

Output

Print the area of the circle (rounded to five decimal places).

Samples

InputOutput
2


Solve in C:

#include<stdio.h>
#define PI 3.141592653589793
int main()
{
    int r;
    double A;
    scanf("%d",&r);
    A=PI*r*r;
    printf("%.10f",A);
    return 0;
}


12.5663706144

No comments

Most View Post

Recent post

RESTful APIs with CRUD Operations in Laravel 12| (2025)

  RESTful APIs serve as the foundation of modern web development. They follow a set of rules called Representational State Transfer (REST) t...

Powered by Blogger.