Advertisement
Guest User

а

a guest
Jun 12th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.05 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         int n = int.Parse(Console.ReadLine());
  7.         for (int row = 0; row <= n / 2 - 1; row++)
  8.         {
  9.             string dots = new string('.', row);
  10.             string stars = new string('*', n - 2 - row * 2);
  11.             string chashka = new string('\\', n / n);
  12.             string chashka2 = new string('/', n / n);
  13.             Console.WriteLine("{0}{2}{1}{3}{0}", dots, stars, chashka, chashka2);
  14.         }
  15.         int stem;
  16.         if (n >= 12)
  17.         {
  18.             stem = n / 2 - 2;
  19.         }
  20.         else
  21.         {
  22.             stem = n / 2 - 1;
  23.         }
  24.         for (int row = 1; row <= stem; row += 1)
  25.         {
  26.             string dots = new string('.', n / 2 + 1 / n - 1);
  27.             string stars = new string('|', n / n);
  28.             Console.WriteLine("{0}{1}{1}{0}", dots, stars);
  29.         }
  30.         for (int row = 1; row <= n / 2 - stem; row += 1)
  31.         {
  32.             string dots = new string('-', n);
  33.             Console.WriteLine("{0}", dots);
  34.         }
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement