+ 2

Loop

can we make a loop in another loop?

7th Feb 2018, 10:38 PM
TOMMY
TOMMY - avatar
4 Answers
+ 4
Yep! You don't have to change anything about it while making the loop, you just have to set it within the curly brackets or whatever your using to specify what's in the loop. For example, in C++, it may look like this: for(int x = 0;x < 7;x++){ for(int y = 0;y < 5;y++){ cout << y << x << endl; } }
7th Feb 2018, 10:41 PM
Faisal
Faisal - avatar
+ 16
yes , u can make any no. of loops in 1 loop
8th Feb 2018, 2:35 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 4
thanks for answers
7th Feb 2018, 10:42 PM
TOMMY
TOMMY - avatar
+ 2
Yes
7th Feb 2018, 10:39 PM
Jax
Jax - avatar