Selasa, 01 Januari 2013
Program Menentukkan Grade Pada Cobol
IDENTIFICATION DIVISION.
PROGRAM-ID. CHECK NILAI.
AUTHOR. AJIE.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 UTS PIC 9(3).
77 UAS PIC 9(3).
77 NILAI PIC 9(3).
SCREEN SECTION.
01 CLS.
02 BLANK SCREEN.
01 INPUTAN.
02 LINE 5 COLUMN 13 "MASUKKAN NILAI UTS : ".
02 COLUMN PLUS 1 PIC 9(3) TO UTS.
02 LINE 6 COLUMN 13 "MASUKKAN NILAI UAS : ".
02 COLUMN PLUS 1 PIC 9(3) TO UAS.
PROCEDURE DIVISION.
MULAI.
DISPLAY CLS.
DISPLAY ( 3, 11 ) '<<< PROGRAM PENGECEKAN NILAI >>>'.
DISPLAY INPUTAN.
ACCEPT INPUTAN.
COMPUTE NILAI =( UTS * 0.7 ) + ( UAS * 0.3 ).
DISPLAY ( 8, 13 ) 'NILAI ANDA : ', NILAI.
IF NILAI < 110 AND NILAI > 85
DISPLAY ( 9, 13 ) 'GRADE A' , ( 10, 13 ) 'ISTIMEWA'.
IF NILAI < 85 AND NILAI > 65
DISPLAY ( 9, 13 ) 'GRADE B' , ( 10, 13 ) 'BAIK'.
IF NILAI < 65 AND > 45
DISPLAY ( 9, 13 ) 'GRADE C' , ( 10, 13 ) 'CUKUP'.
IF NILAI < 45 AND NILAI > 25
DISPLAY ( 9, 13 ) 'GRADE D' , ( 10, 13 ) 'BURUK'.
IF NILAI < 25
DISPLAY ( 9, 13 ) 'GRADE E' , ( 10, 13 ) 'SANGAT BURUK'.
IF NILAI > 71
DISPLAY ( 11, 13 ) 'SELAMAT ANDA LULUS'.
IF NILAI < 70
DISPLAY ( 11, 13 ) 'ANDA TIDAK LULUS'.
DISPLAY ( 15, 11 ) '<<<_______TERIMA KASIH_______>>>'.
SELESAI.
STOP RUN.
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar