Advertisement
YavorJS

butterfly

Jun 10th, 2016
464
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5. static void Main()
  6. {
  7. int n = int.Parse(Console.ReadLine());
  8. //Upper part
  9. for (int i = 1; i <= n - 2; i++)
  10. {
  11. if (i % 2 != 0)
  12. {
  13. Console.Write(new string('*', n - 2) + "\\");
  14. Console.Write(" ");
  15. Console.Write("/" + new string('*', n - 2));
  16. Console.WriteLine();
  17. }
  18. else
  19. {
  20. Console.Write(new string('-', n - 2) + "\\");
  21. Console.Write(" ");
  22. Console.Write("/" + new string('-', n - 2));
  23. Console.WriteLine();
  24. }
  25.  
  26. }
  27.  
  28. //Middle part
  29. Console.Write(new string(' ', n - 1));
  30. Console.Write("@");
  31. Console.Write(new string(' ', n - 1));
  32. Console.WriteLine();
  33.  
  34. //Bottom part
  35. for (int i = 1; i <= n - 2; i++)
  36. {
  37. if (i % 2 != 0)
  38. {
  39. Console.Write(new string('*', n - 2) + "/");
  40. Console.Write(" ");
  41. Console.Write("\\" + new string('*', n - 2));
  42. Console.WriteLine();
  43. }
  44. else
  45. {
  46. Console.Write(new string('-', n - 2) + "/");
  47. Console.Write(" ");
  48. Console.Write("\\" + new string('-', n - 2));
  49. Console.WriteLine();
  50. }
  51. }
  52.  
  53. }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement