Advertisement
a53

LaturaTriunghi

a53
Oct 29th, 2021
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 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 a,b,c,u,alfa;
  8. cin>>a>>b>>u;
  9. alfa=180-u;
  10. c=sqrt(pow((a+b*cos(alfa*PI/180)),2)+pow((b*sin(alfa*PI/180)),2));
  11. int C=c*100;
  12. cout<<C/100<<"."<<(C/10)%10<<C%10;
  13. return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement