CSharp examples for Language Basics:while
Count from 1 to 99 using while loop
class while99 { public static void Main() {/*from w ww. j a v a 2 s . co m*/ int i = 1; while ( i <= 99 ) { System.Console.Write("{0} ", i); i++; } } }