#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int i, row_nr;
cin >> row_nr;
for (i = 1; i <= row_nr; i++)
{
for(int j=0;j<row_nr;j++)
{
cout << i + j*(row_nr)<< " ";
}
cout << endl;
}
return 0;
}
the code worsk perfectly but how can i make it the numbers to stop at 30 so it wont go 36 37..etc
Your question makes no sense.
What does "flipped" mean?
What numbers are "flipped"?
What in the world do you mean by "stop at 30"?
I want this code to give the result
1 4 7
2 5 8
3 6 9
now it gives me the result but the exericse says make N from 1 to 30 my code continues 36 37 38 how can i stop that