Advertisement
viraco4a

Untitled

Mar 12th, 2018
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Mask
  4. {
  5. class Program
  6. {
  7. static void Main()
  8. {
  9. int n = int.Parse(Console.ReadLine());
  10. int colNum = (2 * n) + 2;
  11. //hat:
  12. int spaceCount = (colNum - 4) / 2;
  13. string spaceOne = string.Empty;
  14. string spaceTwo = string.Empty;
  15. for (int i = 1; i < n; i++)
  16. {
  17. spaceCount--;
  18. spaceOne = new string(' ', spaceCount);
  19. spaceTwo = new string(' ', i - 1);
  20. Console.WriteLine($"{spaceOne}/{spaceTwo}| |{spaceTwo}\\");
  21. }
  22. Console.WriteLine(new string('-', colNum));
  23.  
  24. //head:
  25. spaceTwo = new string(' ', n + 1);
  26. spaceOne = new string(' ', (colNum - 4 - n - 1) / 2);
  27. Console.WriteLine($"|{spaceOne}_{spaceTwo}_{spaceOne}|");
  28. Console.WriteLine($"|{spaceOne}@{spaceTwo}@{spaceOne}|");
  29.  
  30. for (int i = 1; i <= (n - 1) / 2; i++)
  31. {
  32. Console.WriteLine($"|{new string(' ', colNum - 2)}|");
  33. }
  34. spaceCount = (colNum - 4) / 2;
  35. spaceOne = new string(' ', spaceCount);
  36. Console.WriteLine($"|{spaceOne}OO{spaceOne}|");
  37. spaceCount--;
  38. spaceOne = new string(' ', spaceCount);
  39. Console.WriteLine($"|{spaceOne}/ \\{spaceOne}|");
  40. Console.WriteLine($"|{spaceOne}||||{spaceOne}|");
  41.  
  42. //beard:
  43. int strangeCount = colNum;
  44. string strange = string.Empty;
  45. int leftCount = 0;
  46. int rightCount = 0;
  47. string left = string.Empty;
  48. string right = string.Empty;
  49. for (int i = 1; i <= n; i++)
  50. {
  51. leftCount++;
  52. rightCount++;
  53. strangeCount-=2;
  54. strange = new string('`', strangeCount);
  55. left = new string('\\', leftCount);
  56. right = new string('/', rightCount);
  57. Console.WriteLine($"{left}{strange}{right}");
  58. }
  59. leftCount++;
  60. rightCount++;
  61. left = new string('\\', leftCount);
  62. right = new string('/', rightCount);
  63. Console.WriteLine($"{left}{right}");
  64. }
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement