-
-
Save astambi/daad7bdab197a725250a4ba20713c51d to your computer and use it in GitHub Desktop.
STOP
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace _05_Problem | |
{ | |
class STOP | |
{ | |
static void Main(string[] args) | |
{ | |
int n = int.Parse(Console.ReadLine()); | |
int rowLen = (n + 1) * 4 - 1; | |
// topSideLen = 2 * n + 1, height = (n + 1) * 2 | |
for (int i = n + 1; i >= 0; i--) | |
{ | |
if (i == n + 1) | |
Console.WriteLine("{0}{1}{0}", | |
new string('.', i), | |
new string('_', rowLen - 2 * i)); | |
else if (i == 0) | |
Console.WriteLine("{0}//{1}STOP!{1}\\\\{0}", | |
new string('.', i), | |
new string('_', (rowLen - 9) / 2)); | |
else | |
Console.WriteLine("{0}//{1}\\\\{0}", | |
new string('.', i), | |
new string('_', rowLen - 2 * i - 4)); | |
} | |
for (int i = 0; i < n; i++) | |
{ | |
Console.WriteLine("{0}\\\\{1}//{0}", | |
new string('.', i), | |
new string('_', rowLen - 2 * i - 4)); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment