Created
June 6, 2015 12:59
-
-
Save vdonchev/dfb836d29a478bdf0d1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class TheExplorer2 | |
{ | |
static void Main() | |
{ | |
int size = int.Parse(Console.ReadLine()); | |
Console.WriteLine("{0}*{0}", new string('-', size / 2)); | |
int inner = 1; | |
int outter = (size - 3) / 2; | |
for (int i = 0; i < size / 2; i++) | |
{ | |
Console.WriteLine("{0}*{1}*{0}", new string('-', outter), new string('-', inner)); | |
outter--; | |
inner += 2; | |
} | |
inner = size - 4; | |
outter = 1; | |
for (int i = 1; i < size / 2; i++) | |
{ | |
Console.WriteLine("{0}*{1}*{0}", new string('-', outter), new string('-', inner)); | |
outter++; | |
inner -= 2; | |
} | |
Console.WriteLine("{0}*{0}", new string('-', size / 2)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment