Return true if character is a vowel in US English.

Given a string representation of a character c in the US-ASCII character set, return true if c is a vowel in written United States English.

1
2
3
""  ⟹ false
"b" ⟹ false
"a" ⟹ true

Compiled as Cobol 2002 by cobc (GNU Cobol) 1.1.0.

program-id. is_vowel_asc_eng is initial.
    data division.
        working-storage section.
            01 n pic 9 value 0.
            01 VOWEL_ASC_ENG pic x(10) value 'aeiouAEIOU'.
        linkage section.
            01 chr pic x.
            01 result pic x.
    procedure division using chr, result.
        move 'f' to result.
        inspect VOWEL_ASC_ENG tallying n for all chr.
        if n > 0 move 't' to result.
end program is_vowel_asc_eng.