Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Draw_Fort
- {
- class Program
- {
- static void Main(string[] args)
- {
- int size = int.Parse(Console.ReadLine());
- int column = size / 2;
- string power = new string('^', column);
- string underscore = new string('_', ((size * 2) - (column * 2) - 4));
- string underscore1 = new string('_', column);
- string space = new string(' ', (size * 2 - 2));
- string space1 = new string(' ', (((size * 2 - 2) - ((size * 2) - (column * 2) - 4))) / 2);
- string space2 = new string(' ', ((size * 2) - 4 - (column * 2)));
- char character = (char)92;
- Console.Write("/");
- Console.Write(power);
- Console.Write(character);
- Console.Write(underscore);
- Console.Write("/");
- Console.Write(power);
- Console.WriteLine(character);
- for (int row = 1; row <= (size -3); row++)
- {
- Console.Write("|");
- Console.Write(space);
- Console.WriteLine("|");
- }
- Console.Write("|");
- Console.Write(space1);
- Console.Write(underscore);
- Console.Write(space1);
- Console.WriteLine("|");
- Console.Write(character);
- Console.Write(underscore1);
- Console.Write("/");
- Console.Write(space2);
- Console.Write(character);
- Console.Write(underscore1);
- Console.Write("/");
- }
- }
- }
Add Comment
Please, Sign In to add comment