Spicke

Попробуй

Nov 10th, 2016
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <iostream>
  2. #include <windows.h>
  3. #include <cmath>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     double z,y1,y2,x,e,min=-100;
  10.     cin >> e;
  11.     y2 = 1 / (cos(sin(min)));
  12.     for(x = -100; x <= 100; x = x + e)
  13.     {
  14.         z = cos(sin(x));
  15.         if(abs(z) > e)
  16.         {
  17.             y1 = 1 / z;
  18.             if(abs(y1) < abs(y2))
  19.             {
  20.                 min = x;
  21.                 y2 = y1;
  22.             }
  23.         }
  24.     }
  25.     cout << "min = " << min << endl;
  26.     cout << "y2 = " << y2;
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment