Advertisement
psotirov

UK Flag

Dec 29th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.90 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. class UKFlag
  7. {
  8.     static void Main()
  9.     {
  10.         int N = int.Parse(Console.ReadLine());
  11.  
  12.         int width = N / 2;
  13.         for (int i = 0; i < width; i++)
  14.         {
  15.             string line = new string('.', i) + "\\" + new string('.', width - i - 1) + "|"
  16.                             + new string('.', width - i - 1) + "/" + new string('.', i);
  17.             Console.WriteLine(line);            
  18.         }
  19.         string middle = new string('-', width) + "*" + new string('-', width);
  20.         Console.WriteLine(middle);
  21.         for (int i = width-1; i >= 0; i--)
  22.         {
  23.             string line = new string('.', i) + "/" + new string('.', width - i - 1) + "|"
  24.                             + new string('.', width - i - 1) + "\\" + new string('.', i);
  25.             Console.WriteLine(line);
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement