Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- long double a,b,c,p,A,r;
- cin>>a>>b>>c;
- if(a+b>c && a+c>b && b+c>a)
- {
- p=(a+b+c)/2;
- A=sqrt(p*(p-a)*(p-b)*(p-c));
- r=A/((a+b+c)/2);
- int R=r*100;
- cout<<R/100<<"."<<R/10%10<<R%10;
- }
- else
- cout<<"Imposibil";
- return 0;
- }
Add Comment
Please, Sign In to add comment