Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
IDENTIFICATION DIVISION.
DATE-WRITTEN. MM-DD-CCYY.
PROGRAM-ID. ConditionNames.
AUTHOR. Elvedin Sumic.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 CharIn PIC X.
88 Vowel VALUE "a", "e", "i", "o", "u".
88 Consonant VALUE "b", "c", "d", "f", "g", "h" "j" THRU "n", "p" THRU "t", "v" THRU "z".
88 Digit VALUE "0" THRU "9".
88 ValidCharacter VALUE "a" THRU "z", "0" THRU "9".
PROCEDURE DIVISION.
0000-MAIN.
DISPLAY "Enter lower case character or digit. Invalid char ends."
ACCEPT CharIn
PERFORM UNTIL NOT ValidCharacter
EVALUATE TRUE
WHEN Vowel DISPLAY "The letter " CharIn " is a vowel."
WHEN Consonant DISPLAY "The letter " CharIn " is a consonant."
WHEN Digit DISPLAY CharIn " is a digit."
END-EVALUATE
ACCEPT CharIn
END-PERFORM
GOBACK.
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more