Program to check whether student is pass or fail by taking result from user.
IDENTIFICATION DIVISION. PROGRAM-ID. EVAL1. DATA DIVISION. 01 RES PIC 999. PROCEDURE DIVISION. DISP. DISPLAY "ENTER YOUR RESULT:". ACCEPT RES. EVALUATE RES WHEN 1 THRU 40 DISPLAY "FAIL" WHEN 40 THRU 50 DISPLAY "PASS" WHEN 51 THRU 60 DISPLAY "SECOND" WHEN 61 THRU 70 DISPLAY "FIRST" WHEN 71 THRU 100 DISPLAY "DISTINCTION" STOP RUN. ************************ OUTPUT*********************************** ENTER YOUR RESULT:-40 FAIL ENTER YOUR RESULT:-45 PASS ENTER YOUR RESULT:-55 SECOND ENTER YOUR RESULT:-99 FIRST