Friday, July 19, 2019

Check vowel or consonant in c program

  Check vowel or consonant in c program:

check vowel or consonant in c



#include<stdio.h>
#include<conio.h>
void main()
{
   char ch;
   clrscr();
   printf ("Enter the characte:-");
   scanf("%c",&ch);
   if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U'||ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u')
   {
      printf("%c is vowel",ch);
   }
   else
   {
      printf("%c is consonant",ch);
   }
  getch();

}

Output:



2nd Outut:



EmoticonEmoticon