Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <cmath>
- #include <iomanip>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "Russian");
- int n = 10;
- double x, y, a, b, delta;
- cout << "Введите a и b" << endl;
- cin >> a >> b;
- x = a;
- cout << endl;
- cout << setw(12) << 'x' << ' ' << setw(12) << 'y' << endl;
- delta = (b - a) / (n - 1);
- while (x <= b) {
- if (x > 0) {
- y = ((sqrt(1 + (pow(x, 2))) + (abs(pow(log(x), 3)) / (1.6 + pow(x, 4))))*sin(7 * x));
- cout << setw(12) << x << ' ' << setw(12) << y << endl;
- }
- else {
- cout << setw(12) << x << ' ' << setw(12) << "NaN" << endl;
- }
- x += delta;
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement