Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #define _USE_MATH_DEFINES
- #include<iostream>
- #include<algorithm>
- #include<vector>
- #include<math.h>
- #include <cmath>
- using namespace std;
- #define ll long double
- ll x0, xk, h;
- int main(void) {
- cin >> x0 >> xk >> h;
- for (ll i = x0; i < xk; i += h) {
- cout << "F(" << i << ") = ";
- if (i < 2)cout << "empty set" << endl;
- else if (i == 2)cout << i * i << " - b^2" << endl;
- else cout << (i - 2 * sin(M_PI*i / 2)) << endl;
- }
- cin >> x0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement