Advertisement
enevlogiev

Summertime

Aug 22nd, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.20 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static void Main()
  6.     {
  7.  
  8.         int n = int.Parse(Console.ReadLine());
  9.         int bottleBottom = 2 * n;
  10.         int bottleTop = n + 1;
  11.  
  12.         int outside = (bottleBottom - bottleTop) / 2;
  13.         int inside = bottleTop - 2;
  14.  
  15.         Console.WriteLine("{0}{1}",
  16.             new string(' ', outside),
  17.             new string('*', bottleTop));
  18.  
  19.         for (int i = 0; i < n / 2 + 1; i++)
  20.         {
  21.             Console.WriteLine("{0}*{1}*",
  22.                 new string(' ', outside),
  23.                 new string(' ', inside));
  24.         }
  25.  
  26.         for (int i = 0; i < n / 2 - 1; i++)
  27.         {
  28.             inside += 2;
  29.             outside--;
  30.             Console.WriteLine("{0}*{1}*",
  31.                 new string(' ', outside),
  32.                 new string(' ', inside));
  33.  
  34.         }
  35.  
  36.         for (int i = 0; i < n; i++)
  37.         {
  38.             Console.WriteLine("*{0}*",
  39.                 new string('.', bottleBottom - 2));
  40.         }
  41.  
  42.  
  43.         for (int i = 0; i < n; i++)
  44.         {
  45.             Console.WriteLine("*{0}*",
  46.                 new string('@', bottleBottom - 2));
  47.         }
  48.  
  49.         Console.WriteLine(new string('*', bottleBottom));
  50.     }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement