IDENTIFICATION DIVISION.
PROGRAM-ID. KONDISI.
AUTHOR. YAN AJIE PRASETIA.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 BILANGAN.
02 A PIC 99.
02 HASIL 99 VALUE 0.
02 SISA PIC 99 VALUE 0.
88 SISA VALUE IS GENAP.
88 SISA VALUE IS GANJIL.
02 BIL PIC X(6).
SCREEN SECTION.
01 CLS.
02 BLANK SCREEN.
PROCEDURE DIVISION.
MULAI.
DISPLAY ( 1, 1 ) 'MASUKKAN BILANGAN ?'.
ACCEPT A.
DIVIDE 2 INTO A GIVING REMAINDER SISA.
IF SISA=0
MOVE 'GENAP' TO BIL
ELSE
MOVE 'GANJIL' TO BIL.
DISPLAY A, 'MERUPAKAN BILANGAN ', BIL.
SELESAI.
STOP RUN.
Tidak ada komentar:
Posting Komentar