Advertisement
Guest User

Untitled

a guest
Jan 26th, 2017
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.00 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 _05.Butterfly
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var n = int.Parse(Console.ReadLine());
  14.  
  15.             if (n==3)
  16.             {
  17.                 Console.WriteLine(new string('*',1)+new string('\\',1)
  18.                     +new string(' ',1)+new string('/',1)+new string('*',1));
  19.                 Console.WriteLine(new string(' ',2)+new string('@',1));
  20.                 Console.WriteLine(new string('*',1)+new string('/',1)
  21.                     +new string(' ',1)+new string('\\',1)+new string('*',1));
  22.             }
  23.             else
  24.             {
  25.                 for (int i = 1; i <= n-2; i++)
  26.                 {
  27.                     if (i % 2 !=0)
  28.                     {
  29.                         Console.WriteLine(new string('*',n-2)+new string('\\',1)
  30.                             +new string(' ',1)+new string('/',1)+new string('*',n-2));
  31.                     }
  32.                     else
  33.                     {
  34.                         Console.WriteLine(new string('-', n - 2) + new string('\\', 1)
  35.                       + new string(' ', 1) + new string('/', 1) + new string('-', n - 2));
  36.                     }
  37.                 }
  38.                 Console.WriteLine(new string(' ',n-1)+new string('@',1));
  39.                 for (int i = 1; i <= n-2; i++)
  40.                 {
  41.                     if (i % 2 != 0)
  42.                     {
  43.                         Console.WriteLine(new string('*', n - 2) + new string('/', 1)
  44.                             + new string(' ', 1) + new string('\\', 1) + new string('*', n - 2));
  45.                     }
  46.                     else
  47.                     {
  48.                         Console.WriteLine(new string('-', n - 2) + new string('/', 1)
  49.                       + new string(' ', 1) + new string('\\', 1) + new string('-', n - 2));
  50.                     }
  51.                 }
  52.             }
  53.         }
  54.     }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement