0

Can i make followng pattern without using nested loop structure

#include <iostream> using namespace std; int main() { int rows; cout << "Enter number of rows: "; cin >> rows; for(int i = 1; i <= rows; ++i) { for(int j = 1; j <= i; ++j) { cout << "* "; } cout << "\n"; } return 0; }

8th Dec 2018, 5:36 AM
Usman Zafar
Usman Zafar - avatar
1 Respuesta