Advertisement
AKIB37

Untitled

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