#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int i, rows = 0, row_nr;
cin >> row_nr;
//if(row_nr > 1 && row_nr <= 30)
{
for (i = 1; i <= 3; i++)
{
for(int j=0;j<row_nr;j++)
{
cout << i + j*(row_nr)<< " ";
}
cout << endl;
}
}
return 0;
}
Have this code it gives me the result i want but i want the function to stop at the number 30 i think its the if statement i have comment it .