On Sep 26, 2:28 am, Pravglad <[email protected]> wrote: > for(int i = 1;i <= 5;i++){ > for(int j = 1;j <= i;j++) > > can someone explain me how this works please Sorry,
I was not awake when I replied. i = 1, j = 1 i = 2, j = 1 i = 2, j = 2 i = 3, j = 1 i = 3, j = 2 i = 3, j = 3 i = 4, j = 1 ... i = 4, j = 4 i = 5, j = 1 ... i = 5, j = 5 Same as I wrote previously wrongly, but within the value of the outer loop's variable. Michèle Garoche -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en
