Hi. I've been working on the first nested loop problem from "Jumping in to C++ book"
I cant seem to get the first column to line up properly, well in fact it's the 9th column is in the between the fist column on every other line. I'll link a pic I think to better explain.
here's the code from the exercise as it is in the book
Code:
include <iostream>
using namespace std;
int main()
{
for ( int i = 0; i < 10; i++)
{
cout << '\t' << i; //\t represents Tab to format the output
}
for ( int i = 0; i < 10; ++i )
{
cout << i;
for ( int j = 0; j < 10; ++j )
{
cout << '\t' << i * j;
}
cout << '\n';
}
}
I've been trawling the forum, and adjusted the code for some time now, but I guess I'm still to green under the collar. Thanks for any tips.