Guest User

Untitled

a guest
Mar 9th, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 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 Butterfly2
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14.  
  15. var width = (4 * n) - 4;
  16. var emptySpaces = width - 4;
  17.  
  18. for (int i = 1; i <= n-2; i++)
  19. {
  20.  
  21.  
  22. string line = new String('x', i).Replace("x", "*\\") + new String('x', emptySpaces).Replace("x", " ")+ new String('x', i).Replace("x", "/*");
  23.  
  24. emptySpaces -= 4;
  25.  
  26.  
  27. Console.WriteLine(line);
  28. }
  29.  
  30. for (int i = 0; i < width/2; i++)
  31. {
  32. string topLine = "\\/";
  33. Console.Write("{0}", topLine);
  34. }
  35. Console.WriteLine();
  36. for (int i = 0; i < n/2; i++)
  37. {
  38. Console.WriteLine("{0}{1}{2}{1}{1}{2}{1}{3}", new string('<', width/2-3), "*", "|", new string('>', width/2-3));
  39. }
  40. for (int i = 0; i < width / 2; i++)
  41. {
  42. string bottomLine = "/\\";
  43. Console.Write("{0}", bottomLine);
  44.  
  45. }
  46. Console.WriteLine();
  47.  
  48. for (int i = n-2; i >= 1; i--)
  49. {
  50. emptySpaces += 4;
  51.  
  52. string line = new String('x', i).Replace("x", "*/") + new String('x', emptySpaces).Replace("x", " ") + new String('x', i).Replace("x", "\\*");
  53.  
  54. Console.WriteLine(line);
  55.  
  56. }
  57.  
  58. }
  59. }
  60. }
Add Comment
Please, Sign In to add comment