Advertisement
Saleh127

Untitled

Apr 29th, 2020
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define pi acos(-1.0)
  5. int main()
  6. {
  7. ll t,i;
  8. double a,a1,a2,b,c,d,e,f,j,l,area;
  9. scanf("%lld",&t);
  10. for(i=1;i<=t;i++)
  11. {
  12. scanf("%lf %lf %lf",&a,&b,&c);
  13. a1=(a*c)/b;
  14. a2=(a+a1)*(c+a1)/(b-a1);
  15. area=a2+a1;
  16. if(b-a1>0)printf("Case %lld: %.8lf\n",i,area);
  17. else
  18. {
  19. printf("Case %lld: -1\n",i);
  20. }
  21. }
  22.  
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement