NEED HELP!

I need a program in c++ that will enter a limit of the loop. using nested for loop with a limit of 3 loops only.

like this !

for (){
for (){
for (){
cout
}
}
}

Sample output:
Enter a number : 3 [enter]

1 2 3
4 5 6
7 8 9

2 3 4
5 6 7
8 9 10

3 4 5
6 7 8
9 10 11
help me please
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
int count = 0;
for(int i =1; i < limit_of_loop + 1; i++)
{
    int count = i;
    for(int j =0; j < 3; j++)
   {
            for(int k =0; k < 3; k++)
           {
              cout<<count<<"  ";
              count++;
           }  
           cout<<"\n"
   }  
  cout<<"\n\n\n"
}
Topic archived. No new replies allowed.