A community for students.
Here's the question you clicked on:
 0 viewing
anonymous
 5 years ago
Can anybody clarified the used of an inner loop (in any programming language)?
anonymous
 5 years ago
Can anybody clarified the used of an inner loop (in any programming language)?

This Question is Closed

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0A nested loop is a logical structure used in computer programming where two repeating statements are placed in a "nested" form, i.e., one loop is situated within the body of the other. In a nested loop, the first iteration of the outer loop causes the inner loop to execute. The inner loop then repeats for as many times as is specified. When the inner loop completes, the outer loop is executed for its second iteration, triggering the inner loop again, and so on until the requirements for the outer loop are complete.

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0for example outer loop goes through rows in 2D array (=rows of table) and inner loop goes through every index in each row (=cells in each rows)

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0In any language and for any loop, the outer loop will run n times for \[1\le i \le n\]and the inner loop will execute \[\sum_{i}^{n} = n(n1)/2\] times. A loop is nothing more than the union of a family of mutally disjoint sets. I hope this is the answer that you are looking for.

carlsmith
 5 years ago
Best ResponseYou've already chosen the best response.0It's like going round a race track, but on each lap of the main track, you have to turn onto another track and go round that a bunch of times. If you had to go round each of the tracks three times. You'd end up going round the main track three times and the inside track nine time, three times for each of the three laps round the main track. You can, in theory, nest as many loops inside one another as you like. Hope that helps.
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.