Advertisement
riff-raff

Peperuda

Feb 12th, 2018
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.33 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Peperuda
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             //INPUT
  14.             int n = int.Parse(Console.ReadLine());
  15.  
  16.             //TOP
  17.             for (int i = 1; i <= n - 2; i++)
  18.             {
  19.                 if (i % 2 != 0)
  20.                 {
  21.                     Console.WriteLine(new string('*', n - 2) + ("\\") + (" ") + ("/") + new string('*', n - 2));
  22.                 }
  23.                 if (i % 2 == 0)
  24.                 {
  25.                     Console.WriteLine(new string('-', n - 2) + ("\\") + (" ") + ("/") + new string('-', n - 2));
  26.                 }
  27.             }
  28.  
  29.             //MID
  30.             Console.WriteLine(new string(' ', n - 1) + ("@") + new string(' ', n - 1));
  31.  
  32.             //BOTT
  33.             for (int i = 1; i <= n - 2; i++)
  34.             {
  35.                 if (i % 2 != 0)
  36.                 {
  37.                     Console.WriteLine(new string('*', n - 2) + ("/") + (" ") + ("\\") + new string('*', n - 2));
  38.                 }
  39.                 if (i % 2 == 0)
  40.                 {
  41.                     Console.WriteLine(new string('-', n - 2) + ("/") + (" ") + ("\\") + new string('-', n - 2));
  42.                 }
  43.             }
  44.         }
  45.     }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement