Output five * using for loop - CSharp Language Basics

CSharp examples for Language Basics:for

Description

Output five * using for loop

Demo Code

using System;//from   w w  w.  jav a  2 s . c o  m
class StarsOneDimension
{
   public static void Main()
   {
      for (int i = 0; i < 5; i++)
      {
         Console.Write("*");
         Console.WriteLine();
      }
   }
}

Result


Related Tutorials