#include <stdio.h>
#include<string.h>

int main() 
{
    char name[50];
    int i;
    char ch;
    int vowel=0,consonants=0;

    printf("\n enter the name :");
    scanf("%s",name);

    for(i=0;name[i]!='\0';i++)
        {
            ch=name[i];

            if(ch>='a' && ch<='z')
            {
                if(ch=='a' || ch=='e' || ch=='i' || ch=='o' || ch=='u')
                {
                    vowel++;
                }
                else
                {
                    consonants++;
                }
            }
            
        }


 printf("\n No of vowels :%d",vowel);
 printf("\n No of consonants :%d",consonants);
    return 0;
}

Embed on website

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