10:6:2


SUBMITTED BY: Guest

DATE: Dec. 5, 2013, 3:14 p.m.

FORMAT: C++

SIZE: 411 Bytes

HITS: 681

  1. #include<iostream>
  2. #include<cmath>
  3. #include<cstdio>
  4. using namespace std;
  5. #define Pi acos(-1)
  6. int main()
  7. {
  8. int cas;
  9. double L,R,rarea,larea;
  10. cin>>cas;
  11. while(cas--)
  12. {
  13. cin>>L;
  14. R = L/5;
  15. rarea = Pi*R*R;
  16. larea = ((((6*L)/10)*L)-rarea);
  17. printf("%.2lf %.2lf\n",rarea,larea);
  18. }
  19. return 0;
  20. }

comments powered by Disqus