Advertisement
Guest User

Untitled

a guest
Feb 1st, 2015
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.70 KB | None | 0 0
  1. using System;
  2.  
  3. class BatesGoikoTower
  4. {
  5.     static void Main()
  6.     {
  7.         char dot = '.';
  8.         char slash = '/';
  9.         char backSlash = '\\';
  10.         char dash = '-';
  11.  
  12.         int n = int.Parse(Console.ReadLine());
  13.  
  14.         int counter = n - 1;
  15.         int dashCounter = 0;
  16.         int dotCounter = 0;
  17.         for (int row = 0; row < n; row++)
  18.         {
  19.             Console.Write(new string(dot, counter));
  20.             Console.Write(new string(slash, 1));
  21.  
  22.             if (row < 5)
  23.             {
  24.                 if (row % 2 == 0)
  25.                 {
  26.                     Console.Write(new string(dot, dotCounter));
  27.                 }
  28.                 else if (row % 2 != 0)
  29.                 {
  30.                     Console.Write(new string(dash, dashCounter));
  31.                 }
  32.             }
  33.             if (row >= 5 && row < 6)
  34.             {
  35.                 Console.Write(new string(dot, dotCounter));
  36.             }
  37.             else if (row == 6)
  38.             {
  39.                 Console.Write(new string(dash, dashCounter));
  40.             }
  41.             else if (row > 6 && row <= 9)
  42.             {
  43.                 Console.Write(new string(dot, dotCounter));
  44.             }
  45.             else if (row == 10)
  46.             {
  47.                 Console.Write(new string(dash, dashCounter));
  48.             }
  49.             else if (row > 10 && row <= 14)
  50.             {
  51.                 Console.Write(new string(dot, dotCounter));
  52.             }
  53.             else if (row == 15)
  54.             {
  55.                 Console.Write(new string(dash, dashCounter));
  56.             }
  57.             else if (row > 15 && row <= 20)
  58.             {
  59.                 Console.Write(new string(dot, dotCounter));
  60.             }
  61.             else if (row == 21)
  62.             {
  63.                 Console.Write(new string(dash, dashCounter));
  64.             }
  65.             else if (row > 21 && row <= 27)                                  
  66.             {
  67.                 Console.Write(new string(dot, dotCounter));
  68.             }
  69.             else if (row == 28)
  70.             {
  71.                 Console.Write(new string(dash, dashCounter));
  72.             }
  73.             else if (row > 28 && row <= 35)
  74.             {
  75.                 Console.Write(new string(dot, dotCounter));    
  76.             }
  77.             else if (row == 36)
  78.             {
  79.                 Console.Write(new string(dash, dashCounter));
  80.             }
  81.             else if (row > 36 && row <= 44)
  82.             {
  83.                 Console.Write(new string(dot, dotCounter));
  84.             }
  85.  
  86.             Console.Write(backSlash);
  87.             Console.WriteLine(new string(dot, counter));
  88.             counter--;
  89.             dashCounter += 2;
  90.             dotCounter += 2;
  91.         }
  92.    }
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement