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 _05_Sword
- {
- class Program
- {
- static void Main(string[] args)
- {
- var n = int.Parse(Console.ReadLine()); //[4...50] 2 * n + 1
- //Top
- string topBord = new string('#', n - 1);
- Console.WriteLine("{0}/^\\{0}", topBord);
- for (int i = 1; i <= n / 2; i++)
- {
- string sharpsTopBord = new string('#', n - i - 1);
- string spasesTopMid = new string(' ', 2 * i + 1);
- Console.WriteLine("{0}.{1}.{0}", sharpsTopBord, spasesTopMid);
- }
- //Middle
- string sharpsMidBord = new string('#', n - n / 2 - 1);
- string spasesMidMid = new string(' ', 2 * (n / 2) + 1);
- string halfSpasesMidMid = new string(' ', (2 * (n / 2)) / 2);
- Console.WriteLine("{0}|{1}S{1}|{0}", sharpsMidBord, halfSpasesMidMid);
- Console.WriteLine("{0}|{1}O{1}|{0}", sharpsMidBord, halfSpasesMidMid);
- Console.WriteLine("{0}|{1}F{1}|{0}", sharpsMidBord, halfSpasesMidMid);
- Console.WriteLine("{0}|{1}T{1}|{0}", sharpsMidBord, halfSpasesMidMid);
- if (n == 4) Console.WriteLine("{0}|{1}|{0}", sharpsMidBord, spasesMidMid);
- for (int i = 0; i < n - 4; i++)
- {
- Console.WriteLine("{0}|{1}|{0}", sharpsMidBord, spasesMidMid);
- }
- Console.WriteLine("{0}|{1}U{1}|{0}", sharpsMidBord, halfSpasesMidMid);
- Console.WriteLine("{0}|{1}N{1}|{0}", sharpsMidBord, halfSpasesMidMid);
- Console.WriteLine("{0}|{1}I{1}|{0}", sharpsMidBord, halfSpasesMidMid);
- Console.WriteLine("@{0}@", new string('=', 2 * n - 1));
- //Bottom
- string sharpsBottBord = new string('#', (n + 3) / 2);
- string spacesBottMid = new string(' ', 2 * n + 1 - (((n + 3) / 2) * 2 + 2));
- string dotsBottMid = new string('.', 2 * n + 1 - (((n + 3) / 2) * 2 + 2));
- for (int i = 0; i < n / 2; i++)
- {
- Console.WriteLine("{0}|{1}|{0}", sharpsBottBord, spacesBottMid);
- }
- Console.WriteLine("{0}\\{1}/{0}", sharpsBottBord, dotsBottMid);
- }
- }
- }
Add Comment
Please, Sign In to add comment