Pyramid Using C#


class
Program
{
static void Main(string[] args)
{
for (int i = 0; i < 20; i++)
{
for (int k = i; k < 20; k++)
{
Console.Write(" ");
}
for (int j = 2 * i + 1; j > 0; j--)
{
Console.Write("*");
}
Console.WriteLine("");
}
Console.ReadLine();
}
}
Next Recommended Reading Creating Pyramid In C#