Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Butterfly
- {
- class Program
- {
- static void Main(string[] args)
- {
- var num = int.Parse(Console.ReadLine());
- var symbolUp = new string('^', num / 2);
- var downDash = new string('_', num / 2);
- var spaces = new string(' ', num / 2 + 1);
- var spacesExtra = new string(' ', num / 2);
- if (num < 5)
- {
- Console.WriteLine('/' + symbolUp + '\\' + '/' + symbolUp + '\\');
- }
- else
- {
- Console.WriteLine('/' + symbolUp + '\\' + downDash + '/' + symbolUp + '\\');
- }
- for (int row = 1; row <= num - 2; row++)
- {
- if (num < 5)
- {
- Console.WriteLine('|' + spaces + spaces + '|');
- }
- else if (row == num - 2)
- {
- Console.WriteLine('|' + spaces + downDash + spaces + '|');
- }
- else
- {
- Console.WriteLine('|' + spaces + spacesExtra + spaces + '|');
- }
- }
- if (num < 5)
- {
- Console.WriteLine('\\' + downDash + '/' + '\\' + downDash + '/');
- } else
- {
- Console.WriteLine('\\' + downDash + '/' + spacesExtra + '\\' + downDash + '/');
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement