+ 2
Why does the output print 12? Should it not finish at 11?
5 Réponses
+ 4
https://code.sololearn.com/c7E7dX7fi7U6/?ref=app
+ 3
Let me explain,
+ 3
No your code prints the number first and checks the condition, that mean it will print 12 first and then check the condition and break the loop. . . .
My code checks the condition first and then prints the number.
that means, it will check if number is > 11 it will break.
untill 9 it is < 11 and as it became 12 it is greater so it will break the loop before printing that number.
if you want to that code please copy it and save it to your account because I wanted to delete it. 😊
+ 2
Ok why did yours stop at 9 and mine printed 12? It's the same code is it not?
+ 1
Ahhh i see now thank you much. You can delete your code now.