Advertisement
bpavlov123bp

Butterfly

Apr 4th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ButterFly
  4. {
  5. class Program
  6. {
  7. public static void Main(string[] args)
  8. {
  9. int n = int.Parse(Console.ReadLine());
  10. for(int i = 1; i <= n - 2; i++)
  11. {
  12. if(i % 2 != 0)
  13. {
  14. Console.WriteLine("{0}\\ /{0}", new string('*', n - 2));
  15. }
  16. if(i % 2 == 0)
  17. {
  18. Console.WriteLine("{0}\\ /{0}", new string('-', n - 2));
  19. }
  20. }
  21. Console.WriteLine("{0}@{0}", new string(' ', n - 1));
  22. for(int i = 1; i <= n - 2; i++)
  23. {
  24. if(i % 2 != 0)
  25. {
  26. Console.WriteLine("{0}/ \\{0}", new string('*', n - 2));
  27. }
  28. if(i % 2 == 0)
  29. {
  30. Console.WriteLine("{0}/ \\{0}", new string('-', n - 2));
  31. }
  32. }
  33. Console.Write("Press any key to continue . . . ");
  34. Console.ReadKey(true);
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement