fbinnzhivko

Fallen In Love 2

Apr 22nd, 2016
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.04 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         int n = int.Parse(Console.ReadLine());
  7.         Console.WriteLine("##{0}##{0}##", new string('.', 2 * n));
  8.  
  9.         int a = 1;
  10.         int b = ((2 * (2 * n + 2)) + 2 - 10) / 2;
  11.         int c = 2;
  12.  
  13.         for (int i = 0; i < n - 1; i++)
  14.         {
  15.             Console.WriteLine("#{0}#{1}#{2}#{1}#{0}#",
  16.                 new string('~', a), new string('.', b), new string('.', c));
  17.             a++;
  18.             b -= 2;
  19.             c += 2;
  20.         }
  21.         int aa = n;
  22.         int bb = 2 * n;
  23.         int cc = 0;
  24.  
  25.         for (int i = 0; i < n; i++)
  26.         {
  27.             Console.WriteLine(".{0}#{1}#{2}#{1}#{0}.",
  28.                 new string('.', cc), new string('~', aa), new string('.', bb));
  29.             aa--;
  30.             bb -= 2;
  31.             cc += 2;
  32.         }
  33.         Console.WriteLine("{0}####{0}", new string('.', 2 * n + 1));
  34.         for (int i = 0; i < n; i++)
  35.         {
  36.             Console.WriteLine("{0}##{0}", new string('.', 2 * n + 2));
  37.         }
  38.     }
  39. }
Add Comment
Please, Sign In to add comment