%{
int vow_count=0;
int const_count =0;
%}
%%
[aeiouAEIOU] {vow_count++;}
[a-zA-Z] {const_count++;}
%%
main()
{
printf("Enter the string of vowels and consonents:");
yylex();
printf
("The
number of vowels are
: %d\n",vow);printf
("The
number of consonants are
: %d\n",cons);return 0;
}
JXsKaW50IHZvd19jb3VudD0wOwppbnQgY29uc3RfY291bnQgPTA7CiV9CgolJQpbYWVpb3VBRUlPVV0ge3Zvd19jb3VudCsrO30KW2EtekEtWl0ge2NvbnN0X2NvdW50Kys7fQolJQoKbWFpbigpCnsKcHJpbnRmKCJFbnRlciB0aGUgc3RyaW5nIG9mIHZvd2VscyBhbmQgY29uc29uZW50czoiKTsKeXlsZXgoKTsKcHJpbnRmKCJUaGUgbnVtYmVyIG9mIHZvd2VscyBhcmU6ICAlZFxuIix2b3cpOwpwcmludGYoIlRoZSBudW1iZXIgb2YgY29uc29uYW50cyBhcmU6ICAlZFxuIixjb25zKTsKcmV0dXJuIDA7Cn0K