Advertisement
Guest User

Untitled

a guest
May 10th, 2017
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.02 KB | None | 0 0
  1. using System;
  2. namespace ConsoleApp3
  3. {
  4.     class Program
  5.     {
  6.         static void Main()
  7.         {
  8.             int n = int.Parse(Console.ReadLine());
  9.  
  10.             int height = (n / 2) + 4;
  11.             int weight = (2 * n) - 1;
  12.  
  13.             Console.WriteLine("@{1}@{1}@", new string('@', 1), new string(' ', (weight - 3) / 2));
  14.             Console.WriteLine("**{0}*{0}**", new string(' ', (weight - 3 - 2) / 2));
  15.             for (int i = 0; i < height - 6; i++)
  16.             {
  17.                 Console.WriteLine("*.{0}* {1}*{2}.{2}*{1} *{0}.*", new string('.', i), new string(' ', (weight - 9 - 1 - (4 * i)) / 2), new string('.', i));
  18.             }
  19.             Console.WriteLine("*{0}*{1}.{1}*{0}*", new string('.', (n / 2) - 1), new string('.', (n / 2) - 2));
  20.             Console.WriteLine("*{0}{1}.{1}{0}*", new string('.', n / 2), new string('*', ((weight - 3) - n) / 2));
  21.             Console.WriteLine("{0}", new string('*', weight));
  22.             Console.WriteLine("{0}", new string('*', weight));
  23.  
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement