29 July 2013

print even numbers 1 between 100 using c#

using System;

class MainClass {
public static void Main() {


for(int i = 0; i <= 100; i++) {
if((i%2) != 0)
continue; // iterate
Console.WriteLine(i);
}

}
}

No comments:

Post a Comment