Saleh127

UVA 10347

Mar 21st, 2021
158
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.  
  8.  
  9.  
  10. double a,b,c,s,i,j,k,l;
  11.  
  12. while(scanf("%lf %lf %lf",&a,&b,&c)!=EOF)
  13. {
  14. if(a+b>c && b+c>a && a+c>b)
  15. {
  16. l=(a+b+c)/2.00;
  17.  
  18. s=sqrt(l*(l-a)*(l-b)*(l-c));
  19.  
  20. k=s*(100.000/75.000);
  21.  
  22. printf("%.3lf\n",k);
  23. }
  24. else
  25. {
  26. printf("-1\n");
  27. }
  28. }
  29.  
  30. return 0;
  31. }
  32.  
Advertisement
Add Comment
Please, Sign In to add comment