0
Why the output is 0 not 1?
int x; for(x=20;x>0;x--){} System.out.print(x);
4 ответов
+ 5
When x becomes 1, it still matches the condition that it is greater than 0. So after that x-- is performed on x which then makes it's value 0 while printing.
+ 4
Because x appears to be 0, when the loop condition appears to be false and the loop breaks.
+ 1
Seb TheS ,sorry, i made a mistake, you're right)