#include <stdio.h>
#include <string.h>
int main()
{
    char string[100];
    printf("enter the string:\n");
    fgets(string,100,stdin);
    int n=strlen(string);
    int vowelcount=0,consocount=0;
    for(int i=0;i<n;i++)
        {
            if(string[i]=='a'||string[i]=='e'||string[i]=='i'||string[i]=='o'||string[i]=='u')
            {
                vowelcount++;
            }
            else
            {
                consocount++;
            }
        }
    printf("the number of vowels are %d\n",vowelcount);
    printf("the number of consonents are %d\n",consocount);
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: