DevJourney · code I wrote while learning

main.c

371 B
% {
#include < stdio.h & gt;
    int vowel = 0, consonant = 0;
    %
}
% % [aAeEiIoOuU] { vowel++; }[a - zA - Z] {
    consonant++;
}
.|\n;
% % int yywrap() {
    return 1;
}
int main() {
    printf(" Enter text :\n & quot;);
    yylex();
    printf(" Vowels = % d\n & quot;, vowel);
    printf(" Consonants = % d\n & quot;, consonant);
    return 0;
}