Advertisement
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 EqualPairs
- {
- class EqualPairs
- {
- static void Main()
- {
- int size = int.Parse(Console.ReadLine());
- int arrowUp = size / 2;
- int botDash = (size - (size / 2 + 2)) * 2;
- //printing the roof
- string roofOfCastle = "/" +
- new string('^', arrowUp) +
- "\\" +
- new string('_', botDash) +
- "/" +
- new string('^', arrowUp) +
- "\\";
- Console.WriteLine(roofOfCastle);
- //printing the middle part
- int whiteSpaces = roofOfCastle.Length - 2;
- for (int currRow = 0; currRow < size - 3; currRow++)
- {
- Console.WriteLine("|" + new string(' ', whiteSpaces) + "|");
- }
- //printing the penultimate row
- Console.WriteLine("|" +
- new string(' ', arrowUp + 1) +
- new string('_', botDash) +
- new string(' ', arrowUp + 1) +
- "|");
- Console.WriteLine("\\" +
- new string('_', arrowUp) +
- "/" +
- new string(' ', botDash) +
- "\\" +
- new string('_', arrowUp) +
- "/");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement