MiroslavKisov

Axe

Jul 31st, 2017
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.21 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 Axe
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int n = int.Parse(Console.ReadLine());
  14.             for (int i = 0, j = 2; i < n; i++, j++)
  15.             {
  16.                 Console.WriteLine(new string('-', n * 3) + '*' + new string('-', i) + '*' + new string('-', 2 * n - j));
  17.             }
  18.             for (int i = 0; i < n/2; i++)
  19.             {
  20.                 Console.WriteLine(new string('*',n*3+1)+new string('-',n-1)+'*'+new string('-',n-1));
  21.             }
  22.             for (int i = 0; i < (n/2)-1; i++)
  23.             {
  24.                 Console.WriteLine(new string('-',(n*3)-i)+'*'+new string('-',(n-1)+2*i)+'*'+new string('-',(n-1)-i));
  25.             }
  26.             if (n%2==0)
  27.             {
  28.                 Console.WriteLine(new string('-', (n * 3) - (n / 2) + 1) + new string('*', 2 * n - 1) + new string('-', n / 2));
  29.             }
  30.             else
  31.             {
  32.                 Console.WriteLine(new string('-', (n * 3) - (n / 2) + 1) + new string('*', 2 * n - 2) + new string('-', (n / 2) + 1));
  33.             }
  34.         }
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment