FaresX

Untitled

Dec 22nd, 2016
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.10 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static void Main(string[] args)
  6.     {
  7.         int n = int.Parse(Console.ReadLine());
  8.         int width = 4 * n + 1, height = 2 * n + 5;
  9.         int dots = (width / 2) - 1, mixedRows = height - 1;
  10.         int dash = 1, dCopy = dots;
  11.  
  12.         Console.WriteLine(new string('.', dots) + '/' + '|' + "\\" + new string('.', dots));
  13.         Console.WriteLine(new string('.', dots) + "\\" + '|' + '/' + new string('.', dots));
  14.         Console.WriteLine(new string('.', dots) + new string('*', 3) + new string('.', dots));
  15.        
  16.         for (int i = 0; i < mixedRows && dCopy >= 1; ++i)
  17.         {
  18.             dCopy--;
  19.             Console.WriteLine(new string('.', dCopy) + '*' + new string('-', dash) + '*' + new string('-', dash) + '*' + new string('.', dCopy));
  20.             dash++;
  21.         }
  22.  
  23.         int nCopy = n;
  24.  
  25.         Console.WriteLine(new string('*', width));
  26.         Console.Write('*');
  27.         for (int i = 0; i < n * 2; ++i) Console.Write("{0}{1}", '.', '*');
  28.         Console.WriteLine();
  29.         Console.WriteLine(new string('*', width));
  30.     }
  31. }
Add Comment
Please, Sign In to add comment