C Program - Check Vowel or Not

#include<stdio.h>
#include<conio.h>
void main()
{
    clrscr();
    char ch;
    printf("Enter an alphabet : ");
    scanf("%c",&ch);
    if(ch=='a' || ch=='A' || ch=='e' || ch=='E' ||
    ch=='i' || ch=='I' || ch=='o' || ch=='O' ||
    ch=='u' || ch=='U')
    {
        printf("\n This is a vowel");
    }
    else
    {
        printf("\n This is not a vowel");
    }
    getch();
}

Run1:
Run 2:







 

No comments:

Post a Comment

100 C Programs with Code and Output

Program 1: C Program To Read Two Numbers And Print The Sum Of Given Two Numbers. Program 2: C Program To Read Three Numbers And Prin...