Guest User

Stop

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