Advertisement
a53

Unghiuri

a53
Jun 30th, 2021
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #define PI 3.141592653589
  4. using namespace std;
  5. int main()
  6. {
  7. double AB,BC,AC,u1,u2,u3;
  8. cin>>AB>>BC>>AC;
  9. if(AB+BC>AC && AB+AC>BC && BC+AC>AB)
  10. {
  11. u1=acos((AC*AC+AB*AB-BC*BC)/(2*AC*AB));
  12. u2=acos((AB*AB+BC*BC-AC*AC)/(2*AB*BC));
  13. u3=acos((AC*AC+BC*BC-AB*AB)/(2*BC*AC));
  14. int U1=(u1*180/PI)*100,U2=(u2*180/PI)*100,U3=(u3*180/PI)*100;
  15. cout<<U1/100<<"."<<U1/10%10<<U1%10<<" ";
  16. cout<<U2/100<<"."<<U2/10%10<<U2%10<<" ";
  17. cout<<U3/100<<"."<<U3/10%10<<U3%10;
  18. }
  19. else
  20. cout<<"Imposibil";
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement