Translate

Monday, May 11, 2020

Check whether the Alphabet is a Vowel or Consonant

/*Program to find whether the alphabet is a vowel or consonant.*/
#include<stdio.h>
#include<conio.h>
void main()
{
    char ch;
    printf("enter an alphabet : ");
    scanf("%c",& ch);
    switch(ch)
    {
        case 'a':
        case 'e':
        case 'i':
        case 'o':
        case 'u':
        printf("Alphabet is a Vowel\n");
        break;
        default:
        printf("Alphabetis a Consonant\n");
        getch();
    }
}

Output:

No comments:

Post a Comment

C program to make a calculator using the switch statement.

/*perform arithmetic calculation on integers in C language*/ #include<stdio.h> #include<conio.h> void main() {     char op;     ...