0

Why, while i is equal to 5,five is not counted in the output??plz give a comprehensive answer

for (int i = 0; i < 10; i++) { if (i == 5) continue; Console.WriteLine(i);

24th Feb 2020, 5:21 PM
Erfan Mostafavi
Erfan Mostafavi - avatar
1 Antwort
+ 5
Because of the continue statement. Edit: from the course/tutorial continue The continue statement is similar to the break statement, but instead of terminating the loop entirely, it skips the current iteration of the loop and continues with the next iteration.
24th Feb 2020, 5:24 PM
Mihai Apostol
Mihai Apostol - avatar