Advertisement
NabilaShova

12578-10:6:2

Jun 17th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<math.h>
  3. #define PI acos(-1)
  4. int main()
  5. {
  6.     int t;
  7.     double l, w, r, R, A, G;
  8.     scanf("%d", &t);
  9.     while(t--)
  10.     {
  11.         scanf("%lf", &l);
  12.         w = (6*l)/10;
  13.         r = (2*l)/10;
  14.         R = (PI*r*r);
  15.         A = l*w;
  16.         G = A-R;
  17.         printf("%.2f %.2f\n", R, G);
  18.     }
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement