Computer Science, asked by shrashtiyadav, 5 months ago

A brief note on
Nested Loop ? ​

Answers

Answered by nishantvipdp
31

Answer:

{\huge\red{\boxed{\boxed{\mathtt{\blue{AÑẞWÉR}}}}}}

A nested loop is a loop within a loop, an inner loop within the body of an outer one. ... Then the second pass of the outer loop triggers the inner loop again. This repeats until the outer loop finishes. Of course, a break within either the inner or outer loop would interrupt this process.

Example :

If a loop exists inside the body of another loop, it's called a nested loop. Here's an example of the nested for loop. // outer loop for (int i = 1; i <= 5; ++i) { // codes // inner loop for(int j = 1; j <=2; ++j) { // codes } .. } Here, we are using a for loop inside another for loop.\huge\boxed{\fcolorbox{black}{yellow}{HOPE\: IT \: HELPS}}

Answered by Anonymous
2

Answer:

A nested loop is a loop within a loop, an inner loop within the body of an outer one. ... Then the second pass of the outer loop triggers the inner loop again. This repeats until the outer loop finishes. Of course, a break within either the inner or outer loop would interrupt this process.

Explanation:

Similar questions