Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- int main()
- {
- int t,i;
- double x,y,r,ans,s1,s2;
- while(scanf("%d",&t)==1)
- {
- x=0,y=0,r=0;
- for(i=1;i<=t;i++)
- {
- scanf("%lf%lf%lf",&x,&y,&r);
- ans=sqrt(x*x+y*y);
- s1=r-ans;
- s2=r+ans;
- printf("%.2lf %.2lf\n",s1,s2);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement