for (int i = 0; i %26lt; 10; i++) {
for (int j = 0; j %26lt; 10; j++) {
// some code here
}
}
inner loop is the one with j, outer the one with i. the part some code here will run 100 times (10 times inner loop x 10 times outer = 100)
value of i and j in some code here part will go like this
i is 0, j goes 0 to 9
i is 1, j goes 0 to 9
...
i is 9, j goes 0 to 9
you can add as much loops inside as you want, thus making it multiple
Hi can u help me some example of a nested for loop or a multiple nested for loop using c language???pls.....?
joechelbasti... I cant go in details and show but I think you do nicely with this link because it has loads of EXAMPLES that will teach you
http://www.fredosaurus.com/notes-cpp/ind...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment