Sim0o0na

05. Cat Watch

Jun 18th, 2018
433
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.64 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 Practice
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int n = int.Parse(Console.ReadLine());
  14.             int space = n;
  15.             int downSlash = n - 2;
  16.             int count = n - 2;
  17.  
  18.             for (int i = 1; i <= count; i++)
  19.             {
  20.                 Console.WriteLine("{0}||{1}||{0}", new string(' ',space), new string('_',downSlash));
  21.             }
  22.             space = n - 1;
  23.             int innerSpace = n;
  24.             Console.WriteLine("{0}//{1}\\\\{0}", new string(' ', space), new string(' ', innerSpace));
  25.             count = n - 4;
  26.             space = n - 2;
  27.             innerSpace = n + 2;
  28.             for (int i = 1; i <= count; i++)
  29.             {
  30.                 if(i == (n - 3) / 2)
  31.                 {
  32.                     Console.WriteLine("{0}||{1}||]",new string(' ',space), new string(' ',innerSpace));
  33.                 }
  34.                 else
  35.                 {
  36.                     Console.WriteLine("{0}||{1}||", new string(' ', space), new string(' ', innerSpace));
  37.                 }
  38.             }
  39.             space++;
  40.             innerSpace-=2;
  41.  
  42.             Console.WriteLine("{0}\\\\{1}//{0}", new string(' ', space), new string(' ', innerSpace));
  43.              space = n;
  44.              downSlash = n - 2;
  45.              count = n - 2;
  46.  
  47.             for (int i = 1; i <= count; i++)
  48.             {
  49.                 Console.WriteLine("{0}||{1}||{0}", new string(' ', space), new string('_', downSlash));
  50.             }
  51.         }
  52.     }
  53. }
Add Comment
Please, Sign In to add comment