{
#include <stdio.h>
int vowels = 0, consonants = 0;
%}
%%
[aAeEiIoOuU] { vowels++; }
[b-df-hj-np-tv-zB-DF-HJ-NP-TV-Z] { consonants++; }
\n
{ return 0; }
.
{}
%%
int main() {
printf("Enter a string: ");
fflush(stdout);
yylex();
printf
("
Number of vowels
: %d\n", vowels); printf
("
Number of consonants
: %d\n", consonants); return 0;
}
eyAKI2luY2x1ZGUgPHN0ZGlvLmg+IAppbnQgdm93ZWxzID0gMCwgY29uc29uYW50cyA9IDA7IAolfSAKIAolJSAKIApbYUFlRWlJb091VV0gICAgICAgIHsgdm93ZWxzKys7IH0gICAgIApbYi1kZi1oai1ucC10di16Qi1ERi1ISi1OUC1UVi1aXSB7IGNvbnNvbmFudHMrKzsgfSAgIApcbiAgICAgICAgICAgICAgICAgICAgCnsgcmV0dXJuIDA7IH0gICAKLiAgICAKe30gCiAKJSUgCiAKaW50IG1haW4oKSB7IAogICAgcHJpbnRmKCJFbnRlciBhIHN0cmluZzogIik7IAogICAgZmZsdXNoKHN0ZG91dCk7ICAgCiAgICB5eWxleCgpOyAgIAogICAgcHJpbnRmKCJOdW1iZXIgb2Ygdm93ZWxzOiAlZFxuIiwgdm93ZWxzKTsgCiAgICBwcmludGYoIk51bWJlciBvZiBjb25zb25hbnRzOiAlZFxuIiwgY29uc29uYW50cyk7IAogICAgcmV0dXJuIDA7IAp9IAo=