Thursday, May 30, 2019

program to find given alphabet is vowel or consonant using switch in c

/* this is the program to find
    given alphabet is vowel or consonant using switch


 date:30/-05-2019
 created by:ANIL DURGAM

*/

#include <stdio.h>
#include <stdlib.h>

int main()
{
    char i;
    printf("please enter your choice\n");
    scanf("%c",&i);
    switch(i)
    {
        case 'a':
        case 'e':
        case 'i':
        case 'o':
        case 'u':
            printf("you have entered vowel\n");
            break;

        default:
            printf("you have entered consonant\n");
    }
    return 0;
}



No comments:

Post a Comment

python class topic video