Aleksandr_Grigoryev

HW8b

Dec 6th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>;
  2. #include <cmath>;
  3. #define PI 3.14159265  
  4. using namespace std;
  5. void STORONA(int a,double x, double y,double &result)
  6. {
  7.  
  8.     result = a*sin(x*PI / 180) / sin(y*PI / 180);
  9. }
  10. int main()
  11. {
  12.     int a;
  13.     double c,b,alpha,beta,gamma;
  14.     cout << "Enter a,gamma,beta";
  15.     cin >> a>>gamma>>beta; 
  16.     alpha = 180 - gamma -beta;
  17.         STORONA(a, beta,alpha, b);
  18.         cout << "b" << b << endl;
  19.         STORONA(a,gamma,alpha, c);
  20.         cout << c;
  21.    
  22.  
  23.     system("pause");
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment