PROGRAM-ID. latihan.
AUTHOR. imran.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 NAMA PIC A(20).
77 UTS PIC 9(3).
77 UAS PIC 9(3).
77 HASIL PIC 9(3).
SCREEN SECTION.
01 HAPUS.
02 BLANK SCREEN.
01 INPUTAN.
02 LINE 1 COLUMN 8 VALUE 'INPUT NAMA :'.
02 COLUMN PLUS 1 PIC A(20) TO NAMA.
02 LINE 2 COLUMN 8 VALUE 'INPUT UTS :'.
02 COLUMN PLUS 1 PIC 9(3) TO UTS.
02 LINE 3 COLUMN 8 VALUE 'INPUT UAS :'.
02 COLUMN PLUS 1 PIC 9(3) TO UAS.
PROCEDURE DIVISION.
MULAI.
DISPLAY HAPUS.
DISPLAY INPUTAN.
ACCEPT INPUTAN.
DISPLAY (5, 10) 'NAMA : ' NAMA.
COMPUTE HASIL = (0.7 * UTS) + (0.3 * UAS).
IF HASIL > 50
DISPLAY 'ANDA LULUS'.
IF HASIL < 50
DISPLAY 'ANDA GAGAL'.
IF HASIL<100
IF HASIL>85
DISPLAY (6, 10) 'GRADE ANDA A'.
IF HASIL<85
IF HASIL>70
DISPLAY (6, 10) 'GRADE ANDA B'.
IF HASIL<70
IF HASIL>60
DISPLAY (6, 10) 'GRADE ANDA C'.
IF HASIL<60
IF HASIL>50
DISPLAY (6, 10) 'GRADE ANDA D'.
IF HASIL<50
DISPLAY (6, 10) 'GRADE ANDA E'.
SELESAI.
STOP RUN.
Tidak ada komentar:
Posting Komentar