using System;
public class GFG{
public static void Main()
{
int n = 6;
printPattern(n);
}
static void printPattern(int n)
int i, j, k = 0;
for (i = 1; i <= n; i++) // row=6
// Print spaces
for (j = i; j < n; j++) {
Console.Write(" ");
// Print #
while (k != (2 * i - 1)) {
if (k == 0 || k == 2 * i - 2)
Console.Write("#");
else
k++;
;
k = 0;
// print next row
Console.WriteLine();
// print last row
for (i = 0; i < 2 * n - 1; i++) {