Проблем с задачата за чертане на крепост
Някой може ли да ми каже къде бъркам?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DrawFort
{
class Program
{
static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
int roof = n / 2;
string roof1 = new string('^', roof);
Console.Write("/" + roof1 + "\\");
if (n > 4)
{
int middle = n / 2;
Console.Write(new string('_', middle));
}
Console.WriteLine("/" + roof1 + "\\");
int leftRightSpaces = n / 2 + 1;
int middleSpaces = n / 2;
for (int i = 0; i < n - 3; i++)
{
Console.Write("|" + new string(' ', leftRightSpaces));
if (n > 4)
{
Console.Write(new string(' ', middleSpaces));
}
Console.WriteLine(new string(' ', leftRightSpaces) + "|");
}
int spacesDown = n / 2 + 1;
Console.Write("|" + new string(' ', spacesDown));
if (n > 4)
{
int middle = n / 2;
Console.Write(new string('_', middle));
}
Console.WriteLine( new string(' ', spacesDown)+ "|");
int floor = n / 2;
int spaces = n / 2;
Console.Write("\\" + new string('_', floor) + "/");
if (n>4)
{
Console.Write(new string(' ', spaces));
}
Console.WriteLine("\\" + new string('_', floor) + "/");
}
}
}