English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2 answers

for (int i = 0; i < 10; i++) {
for (int j = 0; j < 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

2006-08-09 23:48:19 · answer #1 · answered by Bruno 3 · 1 0

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/index.html

2006-08-10 07:40:30 · answer #2 · answered by Joe_Young 6 · 0 0

fedest.com, questions and answers