Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. /*
  2. Mahek Gupta
  3. 10/13/19
  4. */
  5.  
  6.  
  7. public class SeattleTower {
  8. public static final int COUNT = 4;
  9.  
  10. public static void main(String[] args)
  11. {
  12. top();
  13. roof();
  14. mid();
  15. roofBottom();
  16. top();
  17. neck();
  18. roof();
  19. mid();
  20. }
  21.  
  22. public static void top()
  23. {
  24. for (int line = 1; line <= COUNT; line++)
  25. System.out.println(" ||");
  26. }
  27.  
  28. public static void roof()
  29. {
  30. for (int line = 1; line <= COUNT; line++)
  31. {
  32. space(line);
  33. System.out.print("__/");
  34. for (int colon = 0; colon < line * COUNT - COUNT - (line - 1); colon++)
  35. {
  36. System.out.print(":");
  37. }
  38. System.out.print("||");
  39. for (int colon = 0; colon < line * COUNT - COUNT - 1; colon++)
  40. {
  41. System.out.print(":");
  42. }
  43. System.out.println("\\__");
  44.  
  45. }
  46. }
  47.  
  48. public static void space(int line)
  49. {
  50. for (int space = 1; space <= line * -3 + COUNT * 3; space++)
  51. {
  52. System.out.print(" ");
  53. }
  54. }
  55.  
  56. public static void mid()
  57. {
  58. System.out.print(" |");
  59. for (int quotation = 1; quotation <= COUNT * 6; quotation++)
  60. {
  61. System.out.print("\"");
  62. }
  63. System.out.println("|");
  64. }
  65.  
  66. public static void roofBottom()
  67. {
  68. for (int line = 1; line <= COUNT; line++)
  69. {
  70. for (int space = 1; space <= 2 * line - 2; space++)
  71. {
  72. System.out.print(" ");
  73. }
  74. System.out.print("\\_");
  75. for (int sign = 1; sign <= -2 * line + (3 * COUNT + 1); sign++)
  76. {
  77. System.out.print("/\\");
  78. }
  79. System.out.print("_/");
  80. System.out.println();
  81. }
  82. }
  83.  
  84. public static void neck()
  85. {
  86. for (int line = 1; line <= COUNT * COUNT; line++)
  87. {
  88. System.out.println(" |%%||%%|");
  89. }
  90. }
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement