Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save scratchyourbrain/8005f28d1ce45f00e0cb to your computer and use it in GitHub Desktop.
Save scratchyourbrain/8005f28d1ce45f00e0cb to your computer and use it in GitHub Desktop.
C Program to Check Vowel or Consonant
#include <stdio.h>
int main()
{
char c;
printf("Enter an alphabet: ");
scanf("%c",&c);
if(c=='a'||c=='A'||c=='e'||c=='E'||c=='i'||c=='I'||c=='o'||c=='O'||c=='u'||c=='U')
printf("%c is a vowel.",c);
else
printf("%c is a consonant.",c);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment