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