using System;
namespace Rextester
{
public class Program
{
public static void Main(string[] args)
{
int length = int.Parse(Console.ReadLine());
int roof = (length /2 + 1);
int roofCounter = 1;
int dashCounter = length;
for (int i = 0; i < roof; i++)
{
Console.Write(Dashes((dashCounter - 1)/2));
Console.Write(Stars(roofCounter));
Console.Write(Dashes((dashCounter - 1)/2));
Console.WriteLine();
roofCounter += 2;
dashCounter -= 2;
}
for (int i = 0; i < length; i++)
{
Console.Write("|");
Console.Write(Stars(length - 2));
Console.Write("|");
Console.WriteLine();
}
}
static string Stars(int n)
{
return new String('*', n);
}
static string Dashes(int n)
{
return new String('-', n);
}
static string Sticks(int n)
{
return new String('|', n);
}
}
}
|