Created
October 23, 2013 04:02
-
-
Save snadahalli/7112441 to your computer and use it in GitHub Desktop.
C program to check whether a given character is vowel or consonant.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************************** | |
* You can use all the programs on www.c-program-example.com | |
* for personal and learning purposes. For permissions to use the | |
* programs for commercial purposes, | |
* contact info@c-program-example.com | |
* To find more C programs, do visit www.c-program-example.com | |
* and browse! | |
* | |
* Happy Coding | |
***********************************************************/ | |
/*C program to find the given character is Vowel or Consonant */ | |
#include<stdio.h> | |
int main() | |
{ | |
char ch; | |
printf("Enter a single character:\n"); | |
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("The given Character '%c' is a Vowel\n ",ch); | |
} | |
else | |
{ | |
printf("The given Character '%c' is a Consonant\n ",ch); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment