Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <iomanip>
- #include <cmath>
- #include <Windows.h>
- #include <locale>
- #include <math.h>
- #include <conio.h>
- using namespace std;
- void main()
- {
- setlocale(LC_ALL, "Russian");
- double A, B, N, shag, y, x;
- cout << endl;
- cout << "Введите значения А, B" << endl;
- cout << endl;
- do cin >> A >> B;
- while (A == B);
- cout << endl;
- cout << "Введите значениe N" << endl;
- cout << endl;
- do cin >> N;
- while (N < 2.0);
- cout << endl;
- cout << setw(15) << "Значение x: " << setw(15) << "Значение y: " << endl;
- shag = (B - A) / (N - 1.0);
- for (x = A; x <= B; x = x + shag)
- {
- if (x >= 0)
- {
- y = 1.0 / 3.0 * pow(exp(6.3 + sqrt(x)), 1.0 / 7.0) * abs(cos(2.0 * x / 3.0) - x);
- cout << setw(15) << x << setw(15) << y << endl;
- }
- else cout << setw(15) << x << setw(15) << "не существует " << endl;
- }
- _getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment