0
[SOLVED] Guys why it doesnt stop in 10 ?
I tried do an other loop,and it go until 11,but i said him go until 10 i will put the link for you see https://code.sololearn.com/cA1tQft1AN68/?ref=app
5 Respostas
+ 2
Just swap the position of print and increment statement
+ 1
At 10 it pass the condition then it increments to 11 and then you printed it so that's why 11 is there
+ 1
because you increment i before you print it in the while loop. print it first and it will stop at 10
0
When i is 10.
10 <= 10 is true.
Thus 11 is printed.