TO CHECK GIVEN CHARACTER IS VOWEL OR NOT USING SWITCH CASE

Monday, 29 August 2011

#include<stdio.h>
#include<conio.h>
void main()
{
   char ch;
   clrscr();
   printf("Enter any character\n");
   scanf("%c",&ch);
   switch(ch)
     {
       case 'a':
       case 'e':
       case 'i':
       case 'o':
       case 'u':
        printf("It's Vowel\n");
          break;
       
       default:
        printf("Not a Vowel\n");
          break;
     }
getch();
}


OUTPUT:

Enter any character
e
It's Vowel






No comments:

Post a Comment

 

Blogger news

Blogroll

Enter your email address:

Delivered by FeedBurner

Total Pageviews

Followers

Most Reading