Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- int main()
- {
- double pi=2*acos(0.00);
- double r,n,area,b;
- while(scanf("%lf%lf",&r,&n)==2)
- {
- b=sin((2*pi)/n);
- area=(r*r*n*b)/2;
- printf("%.3lf\n",area);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement