Advertisement
Guest User

Strawberry

a guest
Apr 25th, 2016
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.92 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace StrawBerry
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int n = int.Parse(Console.ReadLine());
  14.             int width = 2 * n + 3;
  15.             for (int i = 0; i < n / 2; i++)
  16.             {
  17.                 Console.WriteLine("{1}\\{0}|{0}/{1}", new string('-', n - 2 * i), new string('-', i * 2));
  18.             }
  19.             int dotCount = 1;
  20.             for (int i = 0; i < n / 2 + 1; i++)
  21.             {
  22.                 Console.WriteLine("{0}#{1}#{0}", new string('-', n - 2 * i), new string('.', dotCount));
  23.                 dotCount += 4;
  24.             }
  25.             for (int i = 0; i < n + 1; i++)
  26.             {
  27.                 Console.WriteLine("{0}#{1}#{0}", new string('-', i), new string('.', width - 2 - 2 * i));
  28.             }
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement