Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- float a, b, c, s, A, radius;
- bool Valid(float x, float y, float z)
- {
- if(x + y <= z || x + z <= y || y + z <= x)
- return false;
- else
- return true;
- }
- int main()
- {
- cin>>a>>b>>c;
- if(!Valid(a,b,c))
- cout<<"Imposibil";
- else
- {
- s=(a+b+c)/2;
- A = sqrt((s*(s-a)*(s-b)*(s-c)));
- radius=a*b*c/(4*A);
- cout<<setprecision(2)<<fixed<< (int)(radius*100)/100.0;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement