SHARE
TWEET

Task03NewHowse

g-stoyanov Apr 14th, 2014 339 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. namespace Task03NewHowse
  2. {
  3.     using System;
  4.  
  5.     class Program
  6.     {
  7.         static void Main()
  8.         {
  9.             int height = int.Parse(Console.ReadLine());
  10.             Console.WriteLine(string.Format("{0}*{0}", new string('-', (height - 1) / 2)));
  11.             for (int i = ((height - 1) / 2) - 1; i >= 0; i--)
  12.             {
  13.                 Console.WriteLine(string.Format("{0}{1}{0}", new string('-', i), new string('*', (height - 2 * i))));
  14.             }
  15.  
  16.             for (int i = 0; i < height; i++)
  17.             {
  18.                 Console.WriteLine("|{0}|", new string('*', height - 2));
  19.             }
  20.         }
  21.     }
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top