%{
int vow_count=0;
int const_count =0;
%}
%%
[aeiouAEIOU] {vow_count++;}
[a-zA-Z] {const_count++;}
%%
int yywrap()
{
return 1;
}
int main()
{
printf("Enter the string of vowels and consonants:");
char myString[100];
fgets (myString, sizeof(myString), stdin);
yy_scan_string(myString);
yylex();
printf
("
Number of vowels are
: %d\n", vow_count); printf
("
Number of consonants are
: %d\n", const_count);}
JXsKIAlpbnQgdm93X2NvdW50PTA7CiAJaW50IGNvbnN0X2NvdW50ID0wOwolfQolJQpbYWVpb3VBRUlPVV0ge3Zvd19jb3VudCsrO30KW2EtekEtWl0ge2NvbnN0X2NvdW50Kys7fQolJQppbnQgeXl3cmFwKCkKewogcmV0dXJuIDE7Cn0KaW50IG1haW4oKQp7CnByaW50ZigiRW50ZXIgdGhlIHN0cmluZyBvZiB2b3dlbHMgYW5kIGNvbnNvbmFudHM6Iik7CiAJY2hhciBteVN0cmluZ1sxMDBdOwogCWZnZXRzIChteVN0cmluZywgc2l6ZW9mKG15U3RyaW5nKSwgc3RkaW4pOwogCXl5X3NjYW5fc3RyaW5nKG15U3RyaW5nKTsKIAl5eWxleCgpOwogCXByaW50ZigiTnVtYmVyIG9mIHZvd2VscyBhcmU6ICVkXG4iLCB2b3dfY291bnQpOwogCXByaW50ZigiTnVtYmVyIG9mIGNvbnNvbmFudHMgYXJlOiAlZFxuIiwgY29uc3RfY291bnQpOwp9Cg==