SHOW:
|
|
- or go back to the newest paste.
| 1 | using System; | |
| 2 | using System.Collections.Generic; | |
| 3 | using System.Linq; | |
| 4 | using System.Text; | |
| 5 | using System.Threading.Tasks; | |
| 6 | ||
| 7 | namespace Exam03 | |
| 8 | {
| |
| 9 | class Exam03 | |
| 10 | {
| |
| 11 | static void Main() | |
| 12 | {
| |
| 13 | int n = int.Parse(Console.ReadLine()); | |
| 14 | int frameWidth = 2 / n; //* | |
| 15 | int bridge = n - 1; | |
| 16 | for (int i = 1; i <= n; i++) | |
| 17 | {
| |
| 18 | - | if (i==1||i==n) |
| 18 | + | if (i == 1 || i == n) |
| 19 | {
| |
| 20 | int starCount = (n * 2) - 2; | |
| 21 | Console.Write(' ');
| |
| 22 | Console.Write(new string('*', starCount));
| |
| 23 | Console.Write(' ');
| |
| 24 | - | Console.Write(new string(' ',n));
|
| 24 | + | Console.Write(new string(' ', n));
|
| 25 | Console.Write(new string('*', starCount));
| |
| 26 | Console.Write(' ');
| |
| 27 | } | |
| 28 | else | |
| 29 | {
| |
| 30 | int slashCount = (n * 2) - 2; | |
| 31 | Console.Write('*');
| |
| 32 | - | Console.Write(new string('/',slashCount));
|
| 32 | + | |
| 33 | Console.Write('*');
| |
| 34 | - | if (i==(n/2)+1) |
| 34 | + | if (i == (n / 2) + 1) |
| 35 | {
| |
| 36 | - | Console.Write(new string('-', n - 1));
|
| 36 | + | Console.Write(new string('|', n - 1));
|
| 37 | } | |
| 38 | else | |
| 39 | {
| |
| 40 | Console.Write(new string(' ', n - 1));
| |
| 41 | } | |
| 42 | Console.Write('*');
| |
| 43 | Console.Write(new string('/', slashCount));
| |
| 44 | Console.Write('*');
| |
| 45 | } | |
| 46 | Console.WriteLine(); | |
| 47 | } | |
| 48 | } | |
| 49 | } | |
| 50 | } |