Advertisement
AndreyKlipikov

[Olegu] Prog. Lab2. N26

Dec 18th, 2013
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include "iostream"
  2. #include "conio.h"
  3. #include "math.h"
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8.     cout << "Avtor – Sibaev O., student gr. PIbd-11" << endl;
  9.     cout << "Variant N 26" << endl;
  10.     cout << "Programma vvodit znachenie argumenta x i vichislaet znachenie func Y" << endl;
  11.     cout << "    | 1 - x^4       x > 4" << endl;
  12.     cout << "Y = | -2 * x        0 <= x <= 4" << endl;
  13.     cout << "    | e^sin(x)      x < 0" << endl;
  14.     cout << "vvedite x = ";
  15.    
  16.     double x = 0, y = 0;
  17.     cin >> x;
  18.     y = x > 4 ? 1 - pow(x, 4) : x >= 0 ? -2 * x : pow(exp(1.0), sin(x));
  19.     cout << "Y = " << y << endl;
  20.  
  21.     _getch();
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement