%{
#include<stdio.h>
int vow_count = 0;
int const_count = 0;
%}
%%
[aeiouAEIOU] {vow_count++;}
[a-zA-Z] {const_count++;}
%%
int yywrap(){return 1;}
int main()
{
printf("Enter a string : ");
yylex();
printf("\n No. of vowels = %d", vow_count);
printf("\n No. of consonants = %d\n", const_count);
return 0;
}
JXsKICAgICNpbmNsdWRlPHN0ZGlvLmg+CiAgICBpbnQgdm93X2NvdW50ID0gMDsKICAgIGludCBjb25zdF9jb3VudCA9IDA7CiV9CgolJQpbYWVpb3VBRUlPVV0ge3Zvd19jb3VudCsrO30KW2EtekEtWl0ge2NvbnN0X2NvdW50Kys7fQolJQoKaW50IHl5d3JhcCgpe3JldHVybiAxO30KCmludCBtYWluKCkKewoKICAgIHByaW50ZigiRW50ZXIgYSBzdHJpbmcgOiAiKTsKCiAgICB5eWxleCgpOwoKICAgIHByaW50ZigiXG4gTm8uIG9mIHZvd2VscyA9ICVkIiwgdm93X2NvdW50KTsKICAgIHByaW50ZigiXG4gTm8uIG9mIGNvbnNvbmFudHMgPSAlZFxuIiwgY29uc3RfY291bnQpOwoKICAgIHJldHVybiAwOwp9