Problem Link

**Full Circle= 2*pi;**

**if n-gon is inside the circle then it is make a triangle for each division if we attach the**

**nodes,so that for each triangle the angle will be 2*pi/n;**

**for each triangle the area will be A=r*r*sin(2*P/n)/2)**

**total area =n*A**

For extra info,Click here!

<Source Code>

#include<stdio.h>

#define P 2*acos(0.0)

int main()

{double n,r;

while(scanf(“%lf %lf”,&r,&n)!=EOF)

{printf(“%.3lf\n”,r*r*n*sin(2*P/n)/2);

}

return 0;

}

### Like this:

Like Loading...