Advertisement
arinado

3

Nov 16th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #define _USE_MATH_DEFINES
  3.  
  4. #include<iostream>
  5. #include<algorithm>
  6. #include<vector>
  7. #include<math.h>
  8. #include <cmath>
  9.  
  10. using namespace std;
  11. #define ll long double
  12.  
  13. ll x0, xk, h;
  14.  
  15. int main(void) {
  16.     cin >> x0 >> xk >> h;
  17.     for (ll i = x0; i < xk; i += h) {
  18.         cout << "F(" << i << ") = ";
  19.         if (i < 2)cout << "empty set" << endl;
  20.         else if (i == 2)cout << i * i << " - b^2" << endl;
  21.         else cout << (i - 2 * sin(M_PI*i / 2)) << endl;
  22.     }
  23.     cin >> x0;
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement