Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace DrawFort
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int x = n > 4 ? n * 2 - (n / 2 + 2) * 2 : 0;
- Console.WriteLine("/{0}\\{1}/{0}\\", new string('^', n / 2), new string('_', x));
- for (int i = 0; i < n - 3; i++)
- {
- Console.WriteLine("|{0}|", new string(' ', n * 2 - 2));
- }
- Console.WriteLine("|{0}{1}{0}|", new string(' ', (n * 2 - (x + 2)) / 2), new string('_', x));
- Console.WriteLine("\\{0}/{1}\\{0}/", new string('_', n / 2), new string(' ', x));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement