fbinnzhivko

FallenInLove 01

Apr 22nd, 2016
141
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. public class FallenInLove
  3. {
  4.     public static void Main()
  5.     {
  6.         int n = int.Parse(Console.ReadLine());
  7.  
  8.         char symbol = '#';
  9.         int leafSpace = 0;
  10.         int insideSpace = 2 * n;
  11.         int middleSpace = 0;
  12.  
  13.         for (int i = 0; i < n; i++)
  14.         {
  15.             Console.WriteLine("{0}{1}{0}{2}{0}{3}{0}{2}{0}{1}{0}", symbol, new string('~', leafSpace), new string('.', insideSpace), new string('.', middleSpace));
  16.  
  17.             leafSpace++;
  18.             insideSpace -= 2;
  19.             middleSpace += 2;
  20.         }
  21.  
  22.         int outsideSpace = 1;
  23.  
  24.         for (int i = 0; i <= n; i++)
  25.         {
  26.             Console.WriteLine("{0}{1}{2}{1}{3}{1}{2}{1}{0}", new string('.', outsideSpace), symbol, new string('~', leafSpace), new string('.', middleSpace));
  27.  
  28.             middleSpace -= 2;
  29.             leafSpace--;
  30.             outsideSpace += 2;
  31.         }
  32.  
  33.         for (int i = 0; i < n; i++)
  34.         {
  35.             Console.WriteLine("{0}{1}{1}{0}", new string('.', 2 * n + 2), symbol);
  36.         }
  37.  
  38.     }
  39. }
Add Comment
Please, Sign In to add comment