Advertisement
Pazzobg

Programming Basics Exams/20NOV16_Evening/05. Fox

Mar 11th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.97 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _06.Fox
  4. {
  5.     class Fox
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int n = int.Parse(Console.ReadLine());
  10.             int spaceIn = (2 * n) - 1;
  11.             int cheek = n / 2;
  12.             int forehead = n;
  13.             int l = n / 3;
  14.             int snout = (2 * n) - 1;
  15.  
  16.             for (int i = 1; i <= n; i++)
  17.             {
  18.                 Console.WriteLine("{0}\\{1}/{0}", new string('*', i), new string('-', spaceIn));
  19.                 spaceIn -= 2;
  20.             }
  21.             for (int i = 0; i < l; i++)
  22.             {
  23.                 Console.WriteLine("|{0}\\{1}/{0}|", new string('*', cheek), new string('*', forehead));
  24.                 cheek++;
  25.                 forehead -= 2;
  26.             }
  27.             for (int i = 1; i <= n; i++)
  28.             {
  29.                 Console.WriteLine("{0}\\{1}/{0}", new string('-', i), new string('*', snout));
  30.                 snout -= 2;
  31.             }
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement