%{
#include <stdio.h>
int vowels=0,consonats=0;
%}
%%
[ \n\t] ;\\do nothing
[aeiouAEIOU]+ {vowels++}
[^aeiouAEIOU]+ {consonats++}
%%
int main()
{
printf("enter the string");
yylex;
printf
("
number of vowels are
%d",voewls); printf
("
number of consonants are
%d",consonats);}
int yywrap(){
return 1;
}
JXsKICAjaW5jbHVkZSA8c3RkaW8uaD4KICBpbnQgdm93ZWxzPTAsY29uc29uYXRzPTA7CiV9CgolJQpbIFxuXHRdICAgICA7XFxkbyBub3RoaW5nClthZWlvdUFFSU9VXSsgICAge3Zvd2VscysrfQpbXmFlaW91QUVJT1VdKyAge2NvbnNvbmF0cysrfQolJQppbnQgbWFpbigpCnsKICBwcmludGYoImVudGVyIHRoZSBzdHJpbmciKTsKICB5eWxleDsKICBwcmludGYoIm51bWJlciBvZiB2b3dlbHMgYXJlJWQiLHZvZXdscyk7CiAgcHJpbnRmKCJudW1iZXIgb2YgY29uc29uYW50cyBhcmUgJWQiLGNvbnNvbmF0cyk7Cn0KaW50IHl5d3JhcCgpewogIHJldHVybiAxOwp9Cg==