Pabon_SEC

Little masters

Sep 3rd, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main()
  4. {
  5.     long long int t,r,y,R;
  6.     double a,b,c,d;
  7.     scanf("%lld",&t);
  8.     while(t--)
  9.     {
  10.         scanf("%lld%lld%lld",&r,&y,&R);
  11.         a=(r*r)+(y*y);
  12.         b=sqrt(a);
  13.         c=R+b;
  14.         d=R-b;
  15.         printf("%.2lf %.2lf\n",d,c);
  16.     }
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment