PROGRAM TO CHECK IF THE CHARACTER INPUTTED IS VOWEL OR CONSONANT(MENU-DRIVEN)



#include<stdio.h>
#include<conio.h>
void main()
{
char ab;
int ch=1;/* initalize so that while loop may run first time */

clrscr();
do
{

switch(ch)
{
case 1:
 {
 printf("  ENTER A CHARACTER ");
 scanf(" %c",&ab);
 switch(ab)
 {
case 'a' :
case 'e' :
case 'i' :
case 'o' :
case 'u' :
   printf(" VOWEL\n");
       break;
default:printf(" CONSONANT\n");
 }
break;
 }
}

printf("ENTER 1 FOR RE USING THE PROGRAM ");
printf("ENTER ANY OTHER NUMBER FOR EXIT ");
scanf("%d",&ch);

}while(ch==1);
printf(" THANK YOU FOR USING THE PROGRAM\n");
 printf(" HAVE A NICE DAY\n");

getch();

}

SIMPLE PROGRAMS
FUNCTIONS


NUMBERS


STRINGS AND CHARACTERS

Comments