Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- #include<math.h>
- #define pi acos(-1)
- int main() {
- int t, c=1;
- double R, r, z, n;
- scanf("%d", &t);
- while(t--) {
- scanf("%lf %lf", &R, &n);
- z=sin(pi/n);
- r=(R*z)/(1+z);
- printf("Case %d: %lf\n", c++, r);
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment