#include <iostream>
using namespace std;
int main()
{
int x;
cout << "How many rows would you like? " << endl;
cin >> x;
cout << endl;
cout << "Number| Power 1| Power 2| Power 3| Power 4| Power 5" << endl;
for (int j=0; j<=x; j++)
{
cout << j << "\t" << j << "\t" << pow(j,2) << "\t" << pow(j,3) <<
"\t" << pow(j,4) << "\t" << pow(j,5) << endl;
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)
它会产生上述错误。我不确定出了什么问题,请告诉我。先感谢您。
c++ ×1