Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- void f(float x) {
- if (x == -2) {
- cout << "not defined";
- }
- else cout << (3/abs(pow(x, 3) + 8));
- }
- int main() {
- float a, b, h, x;
- cin >> a >> b >> h;
- cout << "x\tf(x)\n";
- for (x = a; x <= b; x += h) {
- cout << x << "\t";
- f(x);
- cout << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement