Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- #define PI acos(-1)
- int main()
- {
- int t;
- double l, w, r, R, A, G;
- scanf("%d", &t);
- while(t--)
- {
- scanf("%lf", &l);
- w = (6*l)/10;
- r = (2*l)/10;
- R = (PI*r*r);
- A = l*w;
- G = A-R;
- printf("%.2f %.2f\n", R, G);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement