Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- #include<math.h>
- using namespace std;
- int main()
- {
- double a,b,c,s,r;
- while(scanf("%lf%lf%lf", &a, &b, &c) !=EOF)
- {
- if(a==0 || b==0 || c==0)
- printf("The radius of the round table is: 0.000\n");
- else{s=(a+b+c)/2;
- r=(s-a)*(s-b)*(s-c);
- r=r/s;
- r=sqrt(r);
- printf("The radius of the round table is: %0.3lf\n",r);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement