drunin89

Fox

Nov 24th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.12 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 Fox
  8. {
  9.     class Fox
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int n = int.Parse(Console.ReadLine());
  14.             int middle = (int)(n / 3);
  15.             var star = new string('*', (n - 2) / 2 + 1);
  16.             if (n % 2 == 0)
  17.             {
  18.  
  19.             }
  20.             else
  21.             {
  22.                 for (int i = 1; i <= n; i++)
  23.                 {
  24.                     Console.WriteLine(new string('*', i) + @"\" + new string('-', 2*n + 1 - i*2) + "/" + new string('*', i));
  25.                 }
  26.                 for (int i = 0; i < middle*2; i+=2)
  27.                 {
  28.                     Console.WriteLine("|" + star  + @"\" + new string('*', n-i) + "/" + star + "|");
  29.                     star += "*";
  30.                 }
  31.                 for (int i = 1; i <= n; i++)
  32.                 {
  33.                     Console.WriteLine(new string('-', i) + @"\" + new string('*', 2*n+1-i*2) + "/" + new string('-', i));
  34.                 }
  35.  
  36.  
  37.             }
  38.  
  39.         }
  40.     }
  41. }
Add Comment
Please, Sign In to add comment