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 _5
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- if (n%2 != 0)
- {
- int width = 2 * n + 2;
- int spaceRightLeft = n - 2;
- int spaceMiddle = width - 2 * spaceRightLeft - 4;
- for (int i = 0; i < n-1; i++)
- {
- Console.WriteLine("{0}/{1}|{2}|{1}\\", new string(' ', spaceRightLeft), new string(' ', i), new string(' ', spaceMiddle));
- spaceRightLeft--;
- }
- Console.WriteLine($"{new string('-', width)}");
- int rowss = n / 2 + 5;
- for (int row = 1; row <= rowss; row++)
- {
- int spaceLeftRight = (width - 4 - (n + 1))/2;
- if (row == 1)
- {
- Console.WriteLine("|{0}_{1}_{0}|", new string(' ', spaceLeftRight),new string(' ', n+1));
- }
- else if (row == 2)
- {
- Console.WriteLine("|{0}@{1}@{0}|", new string(' ', spaceLeftRight), new string(' ', n + 1));
- }
- else if (row == rowss)
- {
- int spaces = (width - 6)/ 2;
- Console.WriteLine("|{0}||||{0}|", new string(' ', spaces));
- }
- else if (row == rowss - 1)
- {
- int spaces = (width - 6) / 2;
- Console.WriteLine("|{0}/ \\{0}|", new string(' ', spaces));
- }
- else if (row == rowss-2)
- {
- int spaces = (width - 4) / 2;
- Console.WriteLine("|{0}OO{0}|", new string(' ', spaces));
- }
- else
- {
- Console.WriteLine($"|{new string(' ', width - 2)}|");
- }
- }
- int apostrophe = width - 2;
- for (int i = 1; i <= n; i++)
- {
- Console.WriteLine("{0}{1}{2}", new string('\\', i), new string('`', apostrophe), new string('/', i));
- apostrophe -= 2;
- }
- Console.WriteLine($"{new string('\\', n+1)}{new string('/', n+1)}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement