Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 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 Sheriff
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14.  
  15. var length = 3 * n;
  16. var widgth = 2 * n + 8;
  17.  
  18. Console.WriteLine("{0}x{0}", new string('.', length / 2));
  19. Console.WriteLine("{0}/x\\{0}", new string('.', (length / 2) - 1));
  20. Console.WriteLine("{0}x|x{0}", new string('.', (length / 2) - 1));
  21.  
  22. for (int i = 0; i < (n / 2); i++)
  23. {
  24. Console.Write("{0}{1}|{1}{0}", new string('.', (n / 2) - i), new string('x', n + i));
  25. Console.WriteLine();
  26. }
  27.  
  28. for (int i = 0; i < (n / 2) + 1; i++)
  29. {
  30. Console.Write("{0}{1}|{1}{0}", new string('.', i), new string('x', (length / 2) - i));
  31. Console.WriteLine();
  32. }
  33.  
  34. Console.WriteLine("{0}/x\\{0}", new string('.', (length / 2) - 1));
  35. Console.WriteLine("{0}\\x/{0}", new string('.', (length / 2) - 1));
  36.  
  37. for (int i = 0; i < (n / 2); i++)
  38. {
  39. Console.Write("{0}{1}|{1}{0}", new string('.', (n / 2) - i), new string('x', n + i));
  40. Console.WriteLine();
  41. }
  42.  
  43. for (int i = 0; i < (n / 2) + 1; i++)
  44. {
  45. Console.Write("{0}{1}|{1}{0}", new string('.', i), new string('x', (length / 2) - i));
  46. Console.WriteLine();
  47. }
  48.  
  49. Console.WriteLine("{0}x|x{0}", new string('.', (length / 2) - 1));
  50. Console.WriteLine("{0}\\x/{0}", new string('.', (length / 2) - 1));
  51. Console.WriteLine("{0}x{0}", new string('.', length / 2));
  52.  
  53. }
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement