using for loops

thank you
Last edited on
I think this is probably more like what you want:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
void multiTable(int n)
{
    	int max = n + 8;

	for(int i = n - 1; i <= max; i++)
		cout << i << "\t";
	
	cout << endl;

	for (int i = n; i <= max; i++) 
	{
		cout << i << "\t";
		for (int j = n; j <= max; j++)
		{
			cout << (i * j) << "\t";
		}
		cout << endl;
	}
}
Topic archived. No new replies allowed.