Saleh127

UVA 10195

Mar 21st, 2021
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);cout.tie(0);
  9.  
  10.  
  11. double a,b,c,d,e,f;
  12.  
  13. while(scanf("%lf %lf %lf",&a,&b,&c)!=EOF)
  14. {
  15.  
  16. d=(a+b+c)/2.00;
  17.  
  18. e=sqrt(d*(d-a)*(d-b)*(d-c));
  19.  
  20. if(a==0 || b==0 || c==0) printf("The radius of the round table is: %.3lf\n",0);
  21. else printf("The radius of the round table is: %.3lf\n",e/d);
  22.  
  23. }
  24.  
  25. return 0;
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment