Count from 1 to 99 using while loop - CSharp Language Basics

CSharp examples for Language Basics:while

Description

Count from 1 to 99 using while loop

Demo Code

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++;
      }
   }
}

Result


Related Tutorials