SHARE
TWEET

UK flag

Teodor92 Dec 30th, 2012 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Text;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5.  
  6. class ProblemFour
  7. {
  8.     static void Main()
  9.     {
  10.         int n = int.Parse(Console.ReadLine());
  11.         //top
  12.         for (int i = n/2; i > 0; i--)
  13.         {
  14.             Console.Write(new string('.', n/2 - i));
  15.             Console.Write("\\");
  16.             Console.Write(new string('.',i - 1));
  17.             Console.Write("|");
  18.             Console.Write(new string('.',i - 1));
  19.             Console.Write("/");
  20.             Console.Write(new string('.', n / 2 - i));
  21.             Console.WriteLine();
  22.         }
  23.         //middle
  24.         Console.Write(new string('-', n/2));
  25.         Console.Write('*');
  26.         Console.WriteLine(new string('-', n / 2));
  27.         // bottom
  28.         for (int i = n / 2; i > 0; i--)
  29.         {
  30.             Console.Write(new string('.', i - 1));      
  31.             Console.Write("/");
  32.             Console.Write(new string('.', n / 2 - i));
  33.             Console.Write("|");
  34.             Console.Write(new string('.', n / 2 - i));
  35.             Console.Write("\\");
  36.             Console.Write(new string('.', i - 1));
  37.             Console.WriteLine();
  38.         }
  39.     }
  40. }
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