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