Advertisement
Guest User

Untitled

a guest
Apr 30th, 2016
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 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 Stop
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. int num = int.Parse(Console.ReadLine());
  15. string left = "";
  16. string right = "";
  17. string center = "";
  18. int ia = 0;
  19.  
  20. for (int row = 1; row <= num + 2; row++)
  21. {
  22. if (row == 1)
  23. {
  24. left = new string('.', num+2 - row);
  25. center = new string('_', (( 2*num)+1));
  26. right = new string('.', num+2 - row);
  27. }
  28. else
  29. {
  30. if (row == num+2)
  31. {
  32. left = new string('.', num + 2 - row);
  33. left = left + "/";
  34. right = new string('.', num + 2 - row);
  35. right = "\\" + right;
  36. //center = new string('_', (2 * num - 1) + ia);
  37. int stop = (2 * num - 3) + ia - 4;
  38. int stop_del = stop / 2;
  39.  
  40. string center1 = new string('_', stop_del);
  41. center = "/" + center1+"STOP!"+center1 + "\\";
  42.  
  43. //center = "/" + center + "\\";
  44. }
  45. else
  46. {
  47. left = new string('.', num + 2 - row);
  48. left = left + "/";
  49. right = new string('.', num + 2 - row);
  50. right = "\\" + right;
  51. center = new string('_', (2 * num - 3) + ia);
  52. center = "/" + center + "\\";
  53. }
  54. }
  55. ia = ia + 2;
  56. Console.Write(left);
  57. Console.Write(center);
  58. Console.Write(right);
  59. Console.WriteLine();
  60.  
  61. }
  62. ia = ia - 6;
  63. for (int row_next = num; row_next >= 1; row_next--)
  64. {
  65. left = new string('.', num - row_next);
  66. left = left + "\\";
  67. right = new string('.', num - row_next);
  68. right = "/" + right;
  69. center = new string('_', 2 * row_next + ia+1);
  70. center = "\\" + center + "/";
  71.  
  72. Console.Write(left);
  73. Console.Write(center);
  74. Console.Write(right);
  75. Console.WriteLine();
  76. }
  77.  
  78.  
  79. }
  80.  
  81. }
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement