28th Jun 2017, 9:26 AM
Nithiwat
Nithiwat - avatar
5 Antworten
+ 7
I am more interested as to why this specific quiz got past our reviews. :?
28th Jun 2017, 9:49 AM
Hatsy Rei
Hatsy Rei - avatar
+ 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
28th Jun 2017, 9:36 AM
김정제(Legacy)
김정제(Legacy) - avatar
+ 5
I also saw this quiz yesterday. And I got wrong answer. I wondered why cout in java. It's c++
28th Jun 2017, 9:29 AM
김정제(Legacy)
김정제(Legacy) - avatar
+ 5
if first condition is false program do not check whether next condition is true
28th Jun 2017, 9:39 AM
김정제(Legacy)
김정제(Legacy) - avatar
+ 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
28th Jun 2017, 9:43 AM
Nomeh Uchenna Gabriel
Nomeh Uchenna Gabriel - avatar