IDENTIFICATION DIVISION.
PROGRAM-ID. CNINE.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-NAME PIC X(15).
01 WS-SUB1 PIC 999V99.
01 WS-SUB2 PIC 999V99.
01 WS-SUB3 PIC 999V99.
01 WS-TOTAL PIC 999V99.
01 WS-PER PIC 999V99.
PROCEDURE DIVISION.
 ACCEPT WS-NAME.
 DISPLAY "HELLO ," WS-NAME " !!".
 DISPLAY "ENTER MARKS OF 3 SUB".
 ACCEPT WS-SUB1 .
 ACCEPT WS-SUB2 .
 ACCEPT WS-SUB3.
 COMPUTE WS-TOTAL = WS-SUB1 + WS-SUB2 +  WS-SUB3.
 DISPLAY "TOTAL : " WS-TOTAL.
 COMPUTE WS-PER = WS-TOTAL / 3 .
 DISPLAY "PERCETANGE: " WS-PER.
 IF WS-PER >= 80
  DISPLAY "GRADE : A "
 ELSE IF WS-PER >= 70 AND WS-PER < 79
  DISPLAY "GRADE : B "
 ELSE IF WS-PER >= 60 AND WS-PER < 69
  DISPLAY "GRADE : C "
 ELSE IF WS-PER >= 50 AND WS-PER < 59
  DISPLAY "GRADE : D 
 ELSE 
  DISPLAY "SORRY" 
 STOP RUN.

