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 ConsoleApp162
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- string tireta = StringCreater("-", n * 2);
- Console.WriteLine($"|{tireta}|");
- string zvezdi = StringCreater("*", n * 2);
- Console.WriteLine($"|{zvezdi}|");
- string tireta2 = StringCreater("-", n * 2);
- Console.WriteLine($"|{tireta}|");
- var chertifor = n - 1;
- var vulnichki = 2;
- for (int i = 1; i <= n - 1; i++)
- {
- string cherti3 = StringCreater("-", chertifor);
- string vulni = StringCreater("~", vulnichki);
- chertifor--;
- vulnichki = vulnichki + 2;
- Console.WriteLine($"|{cherti3}{vulni}{cherti3}|");
- }
- var tir = 2;
- var vulni2 = n * 2 - 4;
- for (int i = 1; i <= n - 2; i++)
- {
- string cherti4 = StringCreater("-", tir);
- string vulni3 = StringCreater("~", vulni2);
- tir++;
- vulni2 = vulni2 - 2;
- Console.WriteLine($"|{cherti4}{vulni3}{cherti4}|");
- }
- var tochk = n * 2 + 1;
- var tip = 0;
- for (int i = 1; i <= n + 2; i++)
- {
- string toh = StringCreater(".", tochk);
- string tirencata = StringCreater("-", tip);
- if (i == n / 2 + 1)
- {
- string tochif = StringCreater(".", n - 2);
- Console.WriteLine($"{tirencata}\\{tochif}MERRY{tochif}\\");
- }
- else if (i == (n / 2) + 3)
- {
- string tochidd = StringCreater(".", n - 2);
- Console.WriteLine($"{tirencata}\\{tochidd}X-MAS{tochidd}\\");
- }
- else
- {
- Console.WriteLine($"{tirencata}\\{toh}\\");
- }
- tip++;
- }
- string final = StringCreater("-", n + 2);
- string final2 = StringCreater("_", n * 2 + 1);
- Console.WriteLine($"{final}\\{final2})");
- }
- public static string StringCreater(string text, int repeatCount)
- {
- string repeatedText = string.Empty;
- for (int currentCount = 0; currentCount < repeatCount; currentCount++)
- {
- repeatedText += text;
- }
- return repeatedText;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement