Logo 
Search:

C# Forum

Ask Question   UnAnswered
Home » Forum » C#       RSS Feeds

C# programing

  Asked By: Darshana    Date: Jul 30    Category: C#    Views: 1004
  

write a program in C# to display the following pattern:
*
* *
* * *
* * * *
* * * * *

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Cagil Bilgihan     Answered On: Aug 02

static void Main(string[] args)
{
int i, j;
for (i = 1; i <= 5; i++)
{

for (j = 0; j < i; j++)
{
Console.Write("*");

}
Console.WriteLine();
}
Console.ReadKey();
}

 
Didn't find what you were looking for? Find more on C# programing Or get search suggestion and latest updates.




Tagged: