HTML Tutorial || Networking Assignment || Computer Full Forms || Ms-Office Shortcut Keys || Ms-Office Notes || Number System Notes || Internet Assignment
JavaScript Tutorial || CSS Tutorial || Operating System Notes || History of Computer Assignment || Netwoking Notes || Computer Fundamentals Notes

C program to Input any Alphabet and Check Whether it is Vowel or Consonant ?


Q:- Write a C program to Input any Alphabet and Check Whether it is Vowel or
       Consonant ?
      Input
        #include<stdio.h>
        #include<conio.h>
        int main()
   {
char ch;
clrscr();
printf(“Enter a Character =”);
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

Enter a Character = D
D is Consonant.


Comments