Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [STAR WARS 0017]
- Buatlah Program Java untuk menerima INPUT dan menghasilkan OUTPUT berikut:
- --> Program menampilkan pola deret
- +---+
- | |
- +---+
- --> Program ini akan menerima satu INPUT variabel n bertipe bilangan bulat (integer) yang menyatakan ukuran pola
- --> Program ini akan menghasilkan OUTPUT berupa pola deret
- +---+
- | |
- +---+
- seperti pada contoh test case.
- Test Case-1:
- INPUT
- 4
- OUTPUT
- +---+---+---+---+
- | | | | |
- +---+---+---+---+
- Test Case-2:
- INPUT
- 2
- OUTPUT
- +---+---+
- | | |
- +---+---+
- Test Case-3:
- INPUT
- 7
- OUTPUT
- +---+---+---+---+---+---+---+
- | | | | | | | |
- +---+---+---+---+---+---+---+
- Test Case-4:
- INPUT
- 5
- OUTPUT
- +---+---+---+---+---+
- | | | | | |
- +---+---+---+---+---+
- Test Case-5:
- INPUT
- 3
- OUTPUT
- +---+---+---+
- | | | |
- +---+---+---+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement