Advertisement
Guest User

Untitled

a guest
May 20th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. [STAR WARS 0017]
  2. Buatlah Program Java untuk menerima INPUT dan menghasilkan OUTPUT berikut:
  3. --> Program menampilkan pola deret
  4. +---+
  5. | |
  6. +---+
  7. --> Program ini akan menerima satu INPUT variabel n bertipe bilangan bulat (integer) yang menyatakan ukuran pola
  8. --> Program ini akan menghasilkan OUTPUT berupa pola deret
  9. +---+
  10. | |
  11. +---+
  12. seperti pada contoh test case.
  13.  
  14. Test Case-1:
  15. INPUT
  16. 4
  17. OUTPUT
  18. +---+---+---+---+
  19. | | | | |
  20. +---+---+---+---+
  21.  
  22. Test Case-2:
  23. INPUT
  24. 2
  25. OUTPUT
  26. +---+---+
  27. | | |
  28. +---+---+
  29.  
  30. Test Case-3:
  31. INPUT
  32. 7
  33. OUTPUT
  34. +---+---+---+---+---+---+---+
  35. | | | | | | | |
  36. +---+---+---+---+---+---+---+
  37.  
  38. Test Case-4:
  39. INPUT
  40. 5
  41. OUTPUT
  42. +---+---+---+---+---+
  43. | | | | | |
  44. +---+---+---+---+---+
  45.  
  46. Test Case-5:
  47. INPUT
  48. 3
  49. OUTPUT
  50. +---+---+---+
  51. | | | |
  52. +---+---+---+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement