Advertisement
diyanborisov

KingOfThieves

Dec 1st, 2015
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. using System;
  2.  
  3.  
  4.  
  5. class KingOfThieves
  6. {
  7.     static void Main()
  8.     {
  9.         int n = int.Parse(Console.ReadLine());
  10.         char p = char.Parse(Console.ReadLine());
  11.         Console.WriteLine();
  12.         for (int i = 0; i < n/2; i++)
  13.         {
  14.             Console.WriteLine("{0}{1}{0}",new string('-',n/2-i), new string(p,i*2+1));
  15.         }
  16.         Console.WriteLine("{0}",new string(p,n));
  17.         for (int i = 0; i < n / 2; i++)
  18.         {
  19.             Console.WriteLine("{1}{0}{1}", new string(p, (n - 2) - (i*2)), new string('-', i + 1));
  20.         }
  21.         Console.WriteLine();
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement