Advertisement
Guest User

Untitled

a guest
Apr 30th, 2016
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 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. int n = int.Parse(Console.ReadLine());
  14. int underLine = n * 2 - 1;
  15. int dots = n;
  16. string leftDash = "//";
  17. string rightDash = @"\\";
  18. Console.WriteLine("{0}{1}{0}", new string('.', n + 1), new string('_', n * 2 + 1));
  19. for (int i = 0; i < n * 2; i++)
  20. {
  21. Console.WriteLine(@"{0}{1}{2}{3}{0}", new string('.', dots), leftDash, new string('_', underLine), rightDash);
  22.  
  23. if (i == n - 1)
  24. {
  25. Console.WriteLine(@"{0}{1}STOP!{1}{2}", leftDash, new string('_', underLine / 2 - 1), rightDash);
  26. leftDash = @"\\";
  27. rightDash = "//";
  28. }
  29. if (i >= n)
  30. {
  31. underLine -= 2;
  32. dots++;
  33. }
  34. else
  35. {
  36. underLine += 2;
  37. dots--;
  38. }
  39. }
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement