Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. #include "pch.h"
  2. #include <iostream>
  3. #include <locale.h>
  4. #include <cmath>
  5.  
  6.  
  7. using namespace std;
  8. int main()
  9. {
  10. setlocale(LC_ALL, "Rus");
  11. double x, h, H, y, i, a, b, ch1, min, max, X;
  12. ch1 = 1 / 5;
  13. min = 0;
  14. max = 0;
  15. i = 0;
  16. a = 4;
  17. b = 20.5;
  18. cin >> x >> H >> h;
  19. cout << "Значение x:" << x << endl << "Значение H :" << H << endl << "Значение h :" << h << endl;
  20. cout << "x" << "|" << "y" << endl;
  21. //while (i < H / h)
  22. while (i < 401)
  23. {
  24. i += 1;
  25. X = x + i * h;
  26. y = sqrt(pow(pow(x, 4) + pow(pow(2.7, a - X), ch1), ch1)) + log(X - b);
  27. if (y < min) {
  28. min = y;
  29. }
  30. else {
  31. max = y;
  32. }
  33. cout << X << "|" << y << endl;
  34. }
  35. cout << "Значение y:" << y << endl << "Значение i:" << i << endl;
  36. cout << "Минимальное значение:" << min << endl << "Максимальное значение:" << max << endl;
  37.  
  38. return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement