Home

Published

- 1 min read

vowel or consonant in c

img of vowel or consonant in c

The solution for this is noted below

vowel or consonant in c

Solution

   // vowel or consonant check program
#include <stdio.h>
int main()
{
    char ch;
    ch = getchar();
    if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
    {
        printf("%c is Vowel\n", ch);
    }
    else
    {
        printf("%c is consonant\n", ch);
    }
    return 0;
}

Try other methods by searching on the site. That is if this doesn’t work