// statements_while.cs using System; class WhileTest { static void Main() { int n = 1; while (n < 6) { Console.WriteLine("Current value of n is {0}", n); n++; } } } output: Current value of n is 1 Current value of n is 2 Current value of n is 3 Current value of n is 4 Current value of n is 5 // statements_while_2.cs using System; class WhileTest { static void Main() { int n = 1; while (n++ < 6) { Console.WriteLine("Current value of n is {0}", n); } } } output: Current value of n is 2 Current value of n is 3 Current value of n is 4 Current value of n is 5 Current value of n is 6