Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <windows.h>
- #include <format>
- using namespace std;
- int main()
- {
- SetConsoleOutputCP(1251);
- const double p{ 3.14159 };
- double xn{ 4.36 }, xk{ 14.63 }, dx{ 1.23 }, a{ 1.32 }, b{ 9.84 };
- const auto table_format = "x = {:4.2f} \t y = {:4.2f} \n";
- double x, y;
- for (x = xn; x <= xk; x += dx) {
- if (x <= b) {
- y = (2 * pow(pow(log(x + b), 2), 1.0 / 3.0)) / (a * a + x * x);
- }
- else {
- y = pow(x, cos(a + b));
- }
- cout << format(table_format, x, y);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement