28
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
int a = int.Parse(Console.ReadLine());
8
for(int y = 1; y <= a; y++)
9
{
10
for(int x = 1; x <= a - y; x++)
11
{
12
Console.Write(" ");
13
}
14
15
for(int x = 1; x <= y; x++)
16
{
17
Console.Write("*");
18
}
19
20
for(int x = 1; x <= y - 1; x++)
21
{
22
Console.Write("*");
23
}
24
25
Console.WriteLine();
26
}
27
}
28
}
Cached Result