COBOL If…ELSE Examples
IF AGE >= 18
DISPLAY “Able to vote”
ELSE
DISPLAY “To young to vote”.
IF SCORE = 100
DISPLAY “Perfect score”
ELSE
DISPLAY “Not a perfect score”.
IF AGE < 21
DISPLAY “Underage”
ELSE
DISPLAY “Of legal age”.