Advertisement
Lavig

Лабораторна робота №6 (Завдання 1)

Oct 25th, 2024
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <iostream>
  2. #include <windows.h>
  3. #include <format>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     SetConsoleOutputCP(1251);
  9.     double y{}, x{};
  10.     double xn{ 0.25 }, xk{ 6 }, dx{ 0.55 }, a{ 0.86 }, b{ 2.8 };
  11.     const auto table_format = "x = {:4.2f} \t y = {:4.2f} \n";
  12.     for (x = xn; x <= xk; x += dx) {
  13.         y = (pow(a + x, 1 / 3.0) + 2 * tan(x)) / (x - 4.87 * b);
  14.         cout << format(table_format, x, y);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement