Aleksandr_Grigoryev

HW 7c

Dec 6th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 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,dbc,bdc,bcd,bc,dc,adc,ac,dcb;
  14.     cout << "Enter a,gamma,beta";
  15.     cin >> a>>gamma>>beta; 
  16.     cin >> bdc >> dbc;
  17.     alpha = 180 - gamma -beta;
  18.     bcd = 180 - bdc - dbc;
  19.         STORONA(a, beta,alpha, b);
  20.         cout << "AB" << b << endl;
  21.         STORONA(a,gamma,alpha, c);
  22.         cout << "DB"<<c;
  23.         dcb = 180 - dbc - bdc;
  24.         STORONA(c, bdc, dcb, bc);
  25.         cout << "bc" << bc;
  26.         STORONA(c, dbc, dcb, dc);
  27.         cout << "Dc" << dc;
  28.         adc = beta + bdc;
  29.         STORONA(dc, bdc, adc, ac);
  30.         cout << "ac" << ac;
  31.    
  32.  
  33.     system("pause");
  34.     return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment