Program to Display this pattern.....
class Program
{
static void Main(string[] args)
{
for (int i = 1; i <= 5; i++)
{
for (int j = 0; j < 5 - i+1; j++)
Console.Write("-");
for (int j = 1; j < i+1; j++)
Console.Write("*");
Console.WriteLine();
}
Console.Read();
}
}
No comments:
Post a Comment