LISTING PROGRAM :
IDENTIFICATION DIVISION.
PROGRAM-ID. PRINTER1.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 KODE PIC X(6).
77 I PIC 9.
01 ULANG PIC X.
88 LAGI VALUE 'Y', 'y'.
88 TIDAK VALUE 'T', 't'.
01 KETR.
02 KODE-PRIN OCCURS 2 TIMES PIC X(6).
02 KET OCCURS 2 TIMES PIC X(35).
SCREEN SECTION.
01 HAPUS.
02 BLANK SCREEN.
01 LAYAR-MASUK.
02 LINE 4 COLUMN 30 "<< INPUT KODE >>".
02 LINE 6 COLUMN 15 "KODE : ".
02 COLUMN PLUS 1 PIC X(6) TO KODE.
PROCEDURE DIVISION.
UTAMA.
MOVE 'LX800 ' TO KODE-PRIN(1).
MOVE 'EPSON' TO KET(1).
MOVE 'HP1010' TO KODE-PRIN(2).
MOVE 'HP LASER' TO KET(2).
DISPLAY HAPUS.
PERFORM MASUK.
PERFORM CARI VARYING I
FROM 1 BY 1 UNTIL I > 2.
GO TO TANYA.
STOP RUN.
MASUK.
DISPLAY LAYAR-MASUK.
ACCEPT LAYAR-MASUK.
CARI.
IF KODE-PRIN(I)=KODE
DISPLAY(8, 15) 'PRINTER YANG ANDA GUNAKAN ADALAH ', KET(I).
TANYA.
DISPLAY(10, 15) 'APAKAH ADA KODE LAINNYA: '.
ACCEPT ULANG.
IF LAGI GO TO UTAMA.
STOP RUN.
output 1 |
output 2 |
Tidak ada komentar:
Posting Komentar