How to show the result in the form of a table in this task?
Create a program for calculating the function F (x) on the interval [a, b] with step h. The result is presented in the form of a table, the first column of which is the value of the argument, the second is the corresponding value of the function.
#include <iostream> #include <cmath> using namespace std; int main () { double a, b, h; cout << "Введите a: " , cin >> a; cout << "Введите b: " , cin >> b; cout << "Введите шаг h: ", cin >> h; for (double x = a; x <= b; x += h) cout << x << "\t" << tan (x / 2) + 2 * cos (x) << endl; return 0; }