Advertisement
Guest User

Untitled

a guest
Jul 13th, 2015
277
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.  
  3. class Summertime
  4. {
  5.     static void Main()
  6.     {
  7.         int n = int.Parse(Console.ReadLine());
  8.  
  9.         Console.WriteLine("{0}{1}{0}", new string(' ', n / 2), new string('*', n + 1));
  10.  
  11.         for (int i = 0; i < n / 2; i++)
  12.         {
  13.             Console.WriteLine("{0}*{1}*{0}", new string(' ', n / 2), new string(' ', n - 1));
  14.         }
  15.         int outer = n / 2;
  16.         int inner = n - 1;
  17.         for (int i = 0; i < n / 2; i++)
  18.         {
  19.             Console.WriteLine("{0}*{1}*{0}", new string(' ', outer), new string(' ', inner));
  20.             outer--;
  21.             inner += 2;
  22.         }
  23.  
  24.         for (int i = 0; i < n; i++)
  25.         {
  26.             Console.WriteLine("*{0}*", new string('.', 2 * n - 2));
  27.             outer--;
  28.             inner += 2;
  29.         }
  30.  
  31.         for (int i = 0; i < n; i++) {
  32.             Console.WriteLine("*{0}*", new string('@', 2 * n - 2));
  33.             outer--;
  34.             inner += 2;
  35.         }
  36.         Console.WriteLine(new string('*', 2 * n));
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement