Tuesday, 27 September 2016

Wap to check if given value is vowel or not

Wap to check if given value is vowel or not.


//program to find whether entered letter is vowel or not.

#include<stdio.h>
#include<conio.h>
void main( )
{
char ch;
clrscr( );
puts("enter a lowercase letter");
ch=getchar( );
switch(ch);
{
case 'a':
            puts("the vowel is a");
            break;
case 'e':
            puts("the vowel is e");
            break;
case 'i':
            puts("the vowel is i");
            break;
case 'o':
            puts("the vowel is o");
            break;
case 'u':
           puts("the vowel is u");
           break;
default :
           puts("it is not a vowel");
}
getch( );
}

0 comments: