Advertisement
Guest User

Untitled

a guest
Jun 24th, 2013
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.78 KB | None | 0 0
  1. using System;
  2. class BatGoikoTower
  3. {
  4.     static void Main()
  5.     {
  6.         int number = int.Parse(Console.ReadLine());
  7.  
  8.         int dots = number - 1;
  9.         int middle = 0;
  10.         int countForDash = 2;
  11.         int countforIncreasingDashes = 2;
  12.  
  13.         for (int i = 1; i <= number; i++)
  14.         {
  15.             if (i == countForDash)
  16.             {
  17.                 Console.WriteLine("{0}/{1}\\{0}", new string('.', dots), new string('-', middle));
  18.                 countForDash += countforIncreasingDashes;
  19.                 countforIncreasingDashes++;
  20.             }
  21.             else
  22.             {
  23.                 Console.WriteLine("{0}/{1}\\{0}", new string('.', dots), new string('.', middle));
  24.             }
  25.             middle+=2;
  26.             dots --;
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement