0

Why output this code?

int x = 10; for ( ; ; ) { if (x>0) { Console.WriteLine(x); x -= 3; }else break; this code output 10 7 4 1 but int x = 10; for ( ; ; ) { if (x>0) { Console.WriteLine(x); x -= 3; }} this code output anything loop is infinite but why output anything? i think this code output: 10 7 4 1 ( for statement loops continue

12th Jun 2017, 10:53 PM
윀석진
윀석진 - avatar
1 Answer
+ 1
I guess that's​ because your program runs on a server and the server is waiting for your program to finish before to send you the result.
12th Jun 2017, 11:58 PM
Mihai Manole
Mihai Manole - avatar