%{
#include <stdio.h>
int v = 0;
int c = 0;
%}
%%
[ \t\n] ;
[aA] { v++; }
[eE] { v++; }
[iI] { v++; }
[oO] { v++; }
[uU] { v++; }
[^aeiouAEIOU \t\n] { c++; }
%%
int main()
{
printf("Enter the input string:\n");
yylex();
printf
("
Number of vowels
: %d\n", v); printf
("
Number of consonants
: %d\n", c); return 0;
}
int yywrap()
{
return 1;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CmludCB2ID0gMDsKaW50IGMgPSAwOwolfQoKJSUKWyBcdFxuXSA7CgpbYUFdIHsgdisrOyB9CltlRV0geyB2Kys7IH0KW2lJXSB7IHYrKzsgfQpbb09dIHsgdisrOyB9Clt1VV0geyB2Kys7IH0KClteYWVpb3VBRUlPVSBcdFxuXSB7IGMrKzsgfQolJQoKaW50IG1haW4oKQp7CiAgICBwcmludGYoIkVudGVyIHRoZSBpbnB1dCBzdHJpbmc6XG4iKTsKICAgIHl5bGV4KCk7CiAgICBwcmludGYoIk51bWJlciBvZiB2b3dlbHM6ICVkXG4iLCB2KTsKICAgIHByaW50ZigiTnVtYmVyIG9mIGNvbnNvbmFudHM6ICVkXG4iLCBjKTsKICAgIHJldHVybiAwOwp9CgppbnQgeXl3cmFwKCkKewogICAgcmV0dXJuIDE7Cn0K