Advertisement
VictoriaLodochkina

lab9 z1

Nov 21st, 2019
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. double funk(double, double);
  5. int main()
  6. {
  7.     using namespace std;
  8.     double z, x, y;
  9.     cout << "Enter x and y: ";
  10.     cin >> x >> y;
  11.     cout << endl;
  12.     if ((x != y) && (y > 0))
  13.     {
  14.         z = funk(y, x) + fabs(((sqrt(((3 * funk(x, y)))) / ((x - y)*exp(2 * x))));
  15.         cout << funk(y, x) << endl;
  16.         cout << funk(x, y) << endl;
  17.         cout << "Your result: " << z;
  18.     }
  19.     else
  20.     {
  21.         cout << "Error";
  22.     }
  23.     return 0;
  24. }
  25. double funk(double t, double p)
  26. {
  27.     double funkt = asin(3 * t) - sin(2 * p);
  28.     return funkt;
  29. }
  30. RAW Paste Data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement