Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "pch.h"
- #include <iostream>
- #include <locale.h>
- #include <cmath>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "Rus");
- double x, h, H, y, i, a, b, ch1, min, max, X;
- ch1 = 1 / 5;
- min = 0;
- max = 0;
- i = 0;
- a = 4;
- b = 20.5;
- cin >> x >> H >> h;
- cout << "Значение x:" << x << endl << "Значение H :" << H << endl << "Значение h :" << h << endl;
- cout << "x" << "|" << "y" << endl;
- //while (i < H / h)
- while (i < 401)
- {
- i += 1;
- X = x + i * h;
- y = sqrt(pow(pow(x, 4) + pow(pow(2.7, a - X), ch1), ch1)) + log(X - b);
- if (y < min) {
- min = y;
- }
- else {
- max = y;
- }
- cout << X << "|" << y << endl;
- }
- cout << "Значение y:" << y << endl << "Значение i:" << i << endl;
- cout << "Минимальное значение:" << min << endl << "Максимальное значение:" << max << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement