+ 11
Wrong challenge
5 ответов
+ 7
I am more interested as to why this specific quiz got past our reviews. :?
+ 6
int x = 0
for z = 0 ~ 4
condition: z > 2 and ++x > 2
z = 0 => false
z = 1 => false
z = 2 => false
z = 3 => z > 2 is true but ++x is 1 so false
z = 4 => z > 2 is true but ++x is 2 so false
so after for loop x is 2.
But cout is not java.
It should be changed to other thing Such as System.out.print or System.out.println
+ 5
I also saw this quiz yesterday.
And I got wrong answer.
I wondered why cout in java.
It's c++
+ 5
if first condition is false program do not check whether next condition is true
+ 3
Answer is 2 if the output command was
Java's "System.out.println(x);
instead of C++'s "cout<<x;"
https://code.sololearn.com/caZDBufJMZ2C/?ref=app