Junilu Lacar wrote:Maybe I'm missing something but what exactly is the desired behavior?
Based on the users question below, I assumed user expected loop control to be reset to 0 when
i hits 8 (in fact during the first iteration). By changing assignment on line 5 to i = 0 program would satisfy quote below. Is it what OP expects? I'm not that sure.
R Pats wrote:I don't exactly understand why it is not starting the for loop again how that I have updated b & e?
By the way, my advice earlier to use
while loop wasn't accurate. As wrote above, you can achieve that by amending assignment at line 5. But, as Junilu rightly said,
you should define the expected output after program gets executed.