Advertisement
YavorJS

Stop

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