SHARE
    TWEET
    Lavig

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

    Oct 25th, 2024
    166
    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. int main()
    6. {
    7. SetConsoleOutputCP(1251);
    8. double y{}, x{};
    9. double xn{ 0.25 }, xk{ 6 }, dx{ 0.55 }, a{ 0.86 }, b{ 2.8 };
    10. const auto table_format = "x = {:4.2f} \t y = {:4.2f} \n";
    11. for (x = xn; x <= xk; x += dx) {
    12. y = (pow(a + x, 1 / 3.0) + 2 * tan(x)) / (x - 4.87 * b);
    13. cout << format(table_format, x, y);
    14. }
    15. }
    Advertisement
    Add Comment
    Please, Sign In to add comment
    Public Pastes
    We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
    Not a member of Pastebin yet?
    Sign Up, it unlocks many cool features!

    AltStyle によって変換されたページ (->オリジナル) /