+ 5

How to create a Nested loop in c++?

output will be:- *** *** ***

14th Sep 2017, 2:26 AM
Solace
Solace - avatar
3 Answers
+ 6
https://code.sololearn.com/c1Ng9hq7nxQb/?ref=app uses py, a rectangle drawer might be an illustration !
14th Sep 2017, 2:57 AM
Abdur-Rahmaan Janhangeer
Abdur-Rahmaan Janhangeer - avatar
+ 3
int i,j,m,n; cout<<"enter no. of rows\n"; cin>>m; cout<<"enter no. of * to be inserted in a row\n"; cin>>n; for(i=0;i<m;i++) { for(j=0;j<n;j++) { cout<<"*"; } cout<<"\n"; }
14th Sep 2017, 4:29 PM
😎😎Harini Palanisamy😎😎
😎😎Harini Palanisamy😎😎 - avatar