Advertisement
esend3

Untitled

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