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