Advertisement
evage

Untitled

Oct 11th, 2021
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4. int main() {
  5.     double alpha;
  6.     double x, y, z;
  7.     cout << "Enter x value\n"; cin >> x;
  8.     cout << "Enter y value\n"; cin >> y;
  9.     cout << "Enter z value"; cin >> z;
  10.  
  11.     cout << "x  = " << x << endl;
  12.     cout << "y = " << y << endl;
  13.     cout << "z = " << z << endl;
  14.  
  15.     if (y <= 0)
  16.     {
  17.         cout << "error";
  18.         return 0;
  19.     }
  20.     alpha = log(pow(y, -sqrt(abs(x)))) * (x - y / 2) + pow(sin(atan(z)), 2);
  21.     cout << "alpha = " << alpha;
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement