you get the picture, the problem is I cant figure out how to get this to work for me, below is my code, it does the math, but how to display it in the way I want escapes me...any feed back would be much appreciated.
The problem is that you have an end line after every number, so each has its own line. You should only have an end line after a row is computed. Also, the blank space has no purpose, because setw(5) adds needed space.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <iostream>
#include <iomanip>
usingnamespace std;
int main()
{
for (int x =1; x<=12; ++x)
{
for (int y =1; y<=12; ++y) cout << setw(5) << y*x;
cout << endl;
}
cout << "\n\aIt works YAY!" << endl;
return 0;
}