Advertisement
AKIB37

Untitled

Apr 9th, 2020
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int x,y,r;
  6. int t,i;
  7. scanf("%d",&t);
  8. for(i=0;i<t;i++)
  9. {
  10. scanf("%d %d %d",&x,&y,&r);
  11. if(r==x && r==y)
  12. printf("%f %f\n",0,x);
  13. if(r==x && r!=y)
  14. printf("%f %f\n",0,y);
  15. if(r==y && r!=x)
  16. printf("%f %f\n",x,0);
  17. if(r>x)
  18. {
  19. printf("%f %f\n",0,(r-y));
  20. }
  21. if(r<x)
  22. {
  23. printf("%f %f\n",(x-r),y);
  24. }
  25. }
  26. return 0;
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement