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