Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IDENTIFICATION DIVISION.
- PROGRAM-ID. SEGITIGASIKU.
- ENVIRONMENT DIVISION.
- DATA DIVISION.
- WORKING-STORAGE SECTION.
- 01 TINGGI PIC 99.
- 01 PARA PIC 99.
- 01 PARA2 PIC 99.
- 01 PARA3 PIC 99.
- 01 PARA4 PIC 99.
- 01 RMH PIC 99.
- SCREEN SECTION.
- 01 HAPUS.
- 02 BLANK SCREEN.
- PROCEDURE DIVISION.
- MULAI.
- DISPLAY HAPUS.
- COMPUTE PARA = 1.
- DISPLAY(, ) 'Masukan Tinggi : ' ACCEPT TINGGI.
- COMPUTE PARA2 = TINGGI.
- COMPUTE PARA3 = 2 * TINGGI .
- COMPUTE PARA4 = PARA3 + 2.
- MULAI2.
- IF PARA2 NOT< 1
- GO TO ULANG
- ELSE
- IF TINGGI NOT< 1
- GO TO BADAN
- ELSE
- STOP RUN.
- ULANG.
- PERFORM SPASI PARA2 TIMES.
- PERFORM BINTANG PARA TIMES.
- PERFORM ATAP PARA3 TIMES.
- DISPLAY SPACE.
- COMPUTE PARA2 = PARA2 - 1.
- COMPUTE PARA = PARA + 2.
- GO TO MULAI2.
- BINTANG.
- DISPLAY(, ) '*'.
- SPASI.
- DISPLAY(, ) ' '.
- ATAP.
- DISPLAY(, ) '\_'.
- BADAN.
- COMPUTE RMH = PARA3 - 1.
- PERFORM DEPAN PARA4 TIMES.
- PERFORM BELAKANG RMH TIMES.
- DISPLAY SPACE.
- COMPUTE TINGGI = TINGGI - 1.
- GO TO MULAI2.
- DEPAN.
- DISPLAY(, ) '#'.
- BELAKANG.
- DISPLAY(, ) '=='.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement