anonymous
  • anonymous
Can anybody clarified the used of an inner loop (in any programming language)?
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
jamiebookeater
  • jamiebookeater
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
A 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
  • anonymous
for 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
  • anonymous
In 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(n-1)/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.

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

carlsmith
  • carlsmith
It'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.

Looking for something else?

Not the answer you are looking for? Search for more explanations.