Kriss_7777

VIDIN_EXCER_GARAGE

Nov 23rd, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.33 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace GARAGE
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int n = int.Parse(Console.ReadLine());
  14.             int p = 2;
  15.  
  16.             Console.WriteLine(new string('|', 2 * n + 2));
  17.             Console.WriteLine(new string('*', 2 * n + 2));
  18.             Console.Write(new string('|', ((2 * n + 2 - 6) / 2)));
  19.             Console.Write("GARAGE");
  20.             Console.WriteLine(new string('|', ((2 * n + 2 - 6) / 2)));
  21.  
  22.  
  23.             for (int i = 0; i < n + 2 - 6; i++)
  24.             {
  25.                 Console.WriteLine(new string('|', 2 * n + 2));
  26.             }
  27.  
  28.             if (n == 3)
  29.                 p = 1;
  30.  
  31.             for (int i = 0; i < p; i++)
  32.             {
  33.                 Console.Write('|');
  34.                 Console.Write(new string('/', (2 * n + 2 - 8) / 2));
  35.                 Console.Write('|');
  36.                 Console.Write(new string(' ', 4));
  37.                 Console.Write('|');
  38.                 Console.Write(new string('/', (2 * n + 2 - 8) / 2));
  39.                 Console.WriteLine('|');
  40.             }
  41.  
  42.             Console.Write(new string(' ', (2 * n + 2 - 8) / 2 + 1));
  43.             Console.WriteLine(new string('/', 5));
  44.  
  45.         }
  46.     }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment