Pabon_SEC

10:6:2

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