Write a C program to check whether an alphabet is a vowel or consonant

 


#include <stdio.h>
#include <conio.h>
void main()
{
    char a;
    printf("enter a value of a: ");
    scanf("%c", &a);
    if (a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u')
    {
        printf("this is vowel character");
    }
    else
    {
        printf("this is consonant character");
    }
    getch();
}


OUTPUT 

Enter a value of a: i

this is vowel character 


Follow our page for regular updates.

0 Comments