C# program to print full Inverted Pyramid of Stars
Program
using System;
namespace PrintInvertedTriangleOfStar
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Full Inverted Pyramid of Star- Inverted Equilateral Triangle");
Console.Write("Enter the number of rows:\t");
int rows = int.Parse(Console.ReadLine());
int i, j, k = 0;
for(i = rows; i >= 1; i--)
{
for(j = rows; j > i; j--)
{
Console.Write(" ");
}
for(k = 1; k < (i * 2); k++)
{
Console.Write("*");
}
Console.Write("\n");
}
}
}
}
Output
Full Inverted Pyramid of Star- Inverted Equilateral Triangle
Enter the number of rows: 5
*********
*******
*****
***
*