Advertisement
Dubwyn

Untitled

Dec 17th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 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 NewCoin
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14. int middle = 0;
  15. if (n % 2 == 0) middle = n - 1;
  16. else middle = n - 2;
  17.  
  18.  
  19. //Top part
  20. //----------------------------------------------------------------
  21. for (int i = 0; i < n; i++)
  22. {
  23. Console.WriteLine($"{new string(' ', 2 * (n - i))}" +
  24. $"{new string('\\', n - i)}" +
  25. $"{new string('-', 6 * i)}" +
  26. $"{new string('/', n - i)}");
  27. }
  28. //----------------------------------------------------------------
  29.  
  30. //Middle
  31. //----------------------------------------------------------------
  32. for (int i = 1; i <= middle; i++)
  33. {
  34. if (middle / 2 + 1 == i)
  35. {
  36. Console.WriteLine($"|" +
  37. $"{new string('~', n - 1)}" +
  38. $"{new string('/', n + (middle / 2) + 1)}" +
  39. $" ESTD " +
  40. $"{new string('\\', n + (middle / 2) + 1)}" +
  41. $"{new string('~', n - 1)}" +
  42. $"|");
  43. }
  44. else
  45. {
  46. Console.WriteLine($"|" +
  47. $"{new string('-', n - 1)}" +
  48. $"{new string('#', n * 4)}" +
  49. $"{new string('-', n - 1)}" +
  50. $"|");
  51. }
  52. }
  53. //----------------------------------------------------------------
  54.  
  55. //Bottom Part
  56. //----------------------------------------------------------------
  57. for (int i = n - 1; i >= 0; i--)
  58. {
  59. Console.WriteLine($"{new string(' ', 2 * (n - i))}" +
  60. $"{new string('/', n - i)}" +
  61. $"{new string('-', 6 * i)}" +
  62. $"{new string('\\', n - i)}");
  63. }
  64. //----------------------------------------------------------------
  65. }
  66. }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement