PROGRAM OF EVALUATE GENDER FROM USER AND PRINT ACCORDINGLY WHTHER HE/SHE IS MALE OR FEMALE, PROGRAM IS ALLOW TO ENTER "m","male","1".
IDENTIFICATION DIVISION. PROGRAM-ID. evalgender. DATA DIVISION. WORKING-STORAGE SECTION. 01 gender PIC x(6). 88 MALE value"m","male","0". 88 FEMALE value"f","female","1". PROCEDURE DIVISION. para1. DISPLAY "ENTER GENDER". ACCEPT gender. EVALUATE true WHEN MALE DISPLAY "YOUR GENDER IS MALE" WHEN FEMALE DISPLAY "YOUR GENDER IS FEMALE" WHEN OTHER DISPLAY "INVALID GENDER TYPE" END-EVALUATE. STOP RUN. ****************************************************************** ENTER GENDER m YOUR GENDER IS MALE ENTER GENDER 1 YOUR GENDER IS FEMALE ENTER GENDER 4 INVALID GENDER TYPE ******************************************************************