Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace ConsoleApplication4
- {
- using System;
- using System.Text;
- public class Startup
- {
- public static void Main()
- {
- var n = int.Parse(Console.ReadLine());
- var top = new StringBuilder();
- top.Append("/")
- .Append(new string('^', n / 2))
- .Append("\\")
- .Append(new string('_', n - (n / 2 + 2)))
- .Append(new string('_', n - (n / 2 + 2)))
- .Append("/")
- .Append(new string('^', n / 2))
- .Append("\\");
- var middle = new StringBuilder();
- middle
- .Append("|")
- .Append(new string(' ', n * 2 - 2))
- .Append("|");
- var lowestMiddle = new StringBuilder();
- lowestMiddle
- .Append("|")
- .Append(new string(' ', n / 2 + 1))
- .Append(new string('_', n - (n / 2 + 2)))
- .Append(new string('_', n - (n / 2 + 2)))
- .Append(new string(' ', n / 2 + 1))
- .Append("|");
- var bottom = new StringBuilder();
- bottom
- .Append("\\")
- .Append(new string('_', n / 2))
- .Append("/")
- .Append(new string(' ', n - (n / 2 + 2)))
- .Append(new string(' ', n - (n / 2 + 2)))
- .Append("\\")
- .Append(new string('_', n / 2))
- .Append("/");
- var result = new StringBuilder();
- result
- .AppendLine(top.ToString());
- for (int i = 1; i < n - 2; i++)
- {
- result.AppendLine(middle.ToString());
- }
- result
- .AppendLine(lowestMiddle.ToString())
- .Append(bottom.ToString());
- Console.WriteLine(result);
- }
- }
- }
Add Comment
Please, Sign In to add comment