Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.96 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. #include <conio.h>
  4. #include <Windows.h>
  5. using namespace std;
  6. int main ()
  7. {
  8.     double x, y;
  9.     for (double a = 0; a <= 5.0; a+= 0.1)
  10.     {
  11.         for (double b = -2.0; b <= 5.0; b+= 0.2)
  12.         {
  13.             if (b <= a)
  14.             {
  15.                 x = cbrt(a + 6) -cbrt(a - b) + pow(pow(a, 2) + pow(b, 2), 1.0 / 6);
  16.             }
  17.             else if (b > 0.5)
  18.             {
  19.                 x = sqrt(fabs(4 - 4 * pow(a, 3) + pow(b, 6)) + 6) + a - cbrt(2);
  20.             }
  21.             else
  22.             {
  23.                 x = (a*cbrt(a) - 2 * a*cbrt(b) +cbrt(pow(a, 2)*b)) -cbrt(a*pow(b, 2)) / cbrt(pow(a, 2) + 1);
  24.                 cout << "a = " << a << endl;
  25.                 cout << "b = " << b << endl;
  26.                 cout << "x = " << x << endl;
  27.             }
  28.             if ((x!= 0) && (a!= 3.14))
  29.             {
  30.                 y = (1 - 2 * pow(sin(a), 2)) / (1 - sin((4)*a)) - (1 + tan((2)*a)) / (x);
  31.             }
  32.             else
  33.             {
  34.                 y = sqrt(fabs(pow(x, 2) + 3 * x + 2)) - sqrt(fabs(pow(x, 2) - x + 1)) -1;
  35.                 cout << "a = " << a << endl;
  36.                 cout << "y = " << y << endl;
  37.             }
  38.         }
  39.     }
  40.     getch();
  41.     return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement