CSharp examples for Language Basics:for
What is the output, for loop
class allinone//from ww w. j av a2s. c o m { public static void Main() { int i; // One solution: for (i = 1; i <= 10; System.Console.WriteLine("{0}", i++)) ; // empty statement. // Another solution: for (i = 0; ++i <= 10; System.Console.WriteLine("{0}", i)) ; // empty statement. } }