Quick actions

cmd+k|ctrl+k

Navigation

Languages

Task 5

Snippet info

Language

Cpp

Visibility

public

Author

serbon95

Created

2020-11-14T17:32:49Z

Updated

2020-11-14T17:33:07Z

#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
	double x, y, z, xn = 1, xk = 10, step = 1;
	cout << "Task 5"<< endl;
	cout << "|     a    |     a^2   |    a^3   |"<< endl;
	
	for (x = xn; x <= xk; x += step)
	{
		y = x * x; z = x * x * x;
		cout << setw(10) << x << setw(10) << y << setw(10) << z << endl;
	}

	
}
INFO