a53

RazaCercInscris

a53
Jun 29th, 2021 (edited)
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main()
  5. {
  6. long double a,b,c,p,A,r;
  7. cin>>a>>b>>c;
  8. if(a+b>c && a+c>b && b+c>a)
  9. {
  10. p=(a+b+c)/2;
  11. A=sqrt(p*(p-a)*(p-b)*(p-c));
  12. r=A/((a+b+c)/2);
  13. int R=r*100;
  14. cout<<R/100<<"."<<R/10%10<<R%10;
  15. }
  16. else
  17. cout<<"Imposibil";
  18. return 0;
  19. }
Add Comment
Please, Sign In to add comment