Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Fox
- {
- using System;
- public class Fox
- {
- public static void Main()
- {
- int foxSize = int.Parse(Console.ReadLine());
- //printing the top part of the fox (ears)
- int betweenEarsDashes = (foxSize * 2) - 1;
- for (int currRow = 1; currRow <= foxSize; currRow++)
- {
- Console.Write(new string('*', currRow));
- Console.Write('\\');
- Console.Write(new string('-', betweenEarsDashes));
- Console.Write('/');
- Console.WriteLine(new string('*', currRow));
- betweenEarsDashes -= 2;
- }
- //printing the middle row
- int middleRows = foxSize / 3;
- int leftAndRightAst = foxSize / 2;
- int middleAst = foxSize;
- for (int currRow = 0; currRow < middleRows; currRow++)
- {
- Console.Write('|');
- Console.Write(new string('*', leftAndRightAst + currRow));
- Console.Write('\\');
- Console.Write(new string('*', middleAst));
- Console.Write('/');
- Console.Write(new string('*', leftAndRightAst + currRow));
- Console.WriteLine('|');
- middleAst -= 2;
- }
- //printing the bot row
- int astInBotPart = (foxSize * 2) - 1;
- for (int currRow = 1; currRow <= foxSize; currRow++)
- {
- Console.Write(new string('-', currRow));
- Console.Write('\\');
- Console.Write(new string('*', astInBotPart));
- Console.Write('/');
- Console.WriteLine(new string('-', currRow));
- astInBotPart -= 2;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment