#include <iostream> using namespace std; int main() { int input; cout << "Enter Value for rows to print: "; cin >> input; int no = 1; int i, j = 0; while(i<input) { while(j<3) { cout << no << " "; no = no + 1; j++; } cout << endl; j = 0; i++; } return 0; }
i
j
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)