Stupidity and lack of understanding
What was the question?
Generally for loops though the parameters are
starting value
condition to keep going
changing of value
So in cases like i > 0 you should be having the value getting smaller
Going top to bottom here:
1) counts 0.5, 1.5, ... , 11.5 (since it's adding one)
2) Loop keeps going until it rolls over the integer 10, 11, ..., MAX_INT (because starting at 10 and incrementing by 1 each time would make it always greater than 0)
3) Goes from 20, 19,,,,0 (since i >= 0)
4) The one you selected, does run. Since it starts at i = 0 but i > 10...so 0 > 10, which is false at the very beginning
5) Goes from 0, 1, ..., 9
6) Goes from 1, 3, ... 7, 9 (since starting at 1 and incrementing by 2 each time)
7) Goes from 0, 2, .... 18 (since it starts at 0, increments 2 each time)
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now