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 Exam
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int columns = n * 6;
- int middleRows = n % 2 == 0 ? n - 1 : n - 2;
- int rows = 2 * n + middleRows;
- int margin = 0;
- int lastmiddle = 0;
- int emptySpaces = 0;
- for (int i = 0; i < n; i ++)
- {
- string filling = new string('-', i * 6);
- lastmiddle = i * 6;
- string emptySpace = new string(' ', (columns / 2) - (n - i) - margin);
- emptySpaces = (columns / 2) - (n - i) - margin;
- string turnedLeft = new string('\\', n - i);
- string turnedRight = new string('/', n - i);
- Console.WriteLine(emptySpace + turnedLeft + filling + turnedRight + emptySpace);
- margin += 3;
- }
- string a = new string('-', n - 1);
- string b = new string('#', columns - ((n - 1) * 2 + 2));
- string middleSpace = ("|" + a + b + a + "|");
- for (int i = 0; i < middleRows / 2 + 1; i++)
- {
- Console.WriteLine(middleSpace);
- }
- a = new string('~', n - 1);
- int middleName = columns - ((n - 1) * 2 + 2);
- b = new string('/', (middleName - 6) / 2);
- string c = new string('\\', (middleName - 6) / 2);
- string name = ("|" + a + b + " ESTD " + c + a + "|");
- Console.WriteLine(name);
- for (int i = 0; i < middleRows / 2 + 1; i++)
- {
- Console.WriteLine(middleSpace);
- }
- margin = 0;
- int middleFilling = lastmiddle;
- for (int i = 0; i < n; i++)
- {
- string filling = new string('-', middleFilling);
- string emptySpace = new string(' ', emptySpaces);
- string turnedLeft = new string('\\', i + 1);
- string turnedRight = new string('/', i + 1 );
- Console.WriteLine(emptySpace + turnedLeft + filling + turnedRight + emptySpace);
- margin += 3;
- middleFilling -= 6;
- emptySpaces += 2;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement