Question: Nested loop

Question:Nested loop

yan 5

Given the following code:

for i[1] from 0 to 1 do  

for i[2] from 0 to 1 do

for i[3] from 0 to  1 do                             end do:  end do:  end do:

Resulting:     000, 001, 010, 011, 100, 101,110, 111

Is anybody aware of a simplification of this code ?

Thanks to all of you.

Please Wait...