NikolaySpasovTriset

STOP!

Oct 10th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5. static void Main(string[] args)
  6. {
  7. int n = int.Parse(Console.ReadLine());
  8. int newDashes = 0;
  9. int newDashesBottom = 0;
  10. //first row
  11. Console.Write(new string('.', n + 1));
  12. Console.Write(new string('_', (2 * n) + 1));
  13. Console.WriteLine(new string('.', n + 1));
  14. //form second row to the middle, excludind STOP row
  15.  
  16. for (int i = 0; i < n; i++)
  17. {
  18.  
  19. Console.Write(new string('.', n - i));
  20. Console.Write("//");
  21. Console.Write(new string('_', (n * 2) - 1 + newDashes));
  22. Console.Write(@"\\");
  23. Console.WriteLine(new string('.', n - i));
  24. newDashes += 2;
  25. }
  26. //middle row, or STOP! row:
  27. Console.Write("//");
  28. Console.Write(new string('_', ((n * 4) - 6) / 2) + "STOP!");
  29. Console.Write(new string('_', ((n * 4) - 6) / 2));
  30. Console.WriteLine(@"\\");
  31.  
  32. //bottom section
  33. for (int i = 0; i < n; i++)
  34. {
  35. Console.Write(new string('.', (n - n) + i));
  36. Console.Write(@"\\");
  37. Console.Write(new string('_', (n * 4) - 1 - newDashesBottom));
  38. Console.Write("//");
  39. Console.WriteLine(new string('.', (n - n) + i));
  40. newDashesBottom += 2;
  41. }
  42. }
  43. }
Add Comment
Please, Sign In to add comment