Is it a VOWEL or CONSONANT
Write a program to take a character as input and check whether the given character is a vowel or a consonant.
Vowels are 'A', 'E', 'I', 'O', 'U'. Rest all alphabets are called consonants.
Input:
- First line will contain the character .
Output:
Print "Vowel" if the given character is a vowel, otherwise print "Consonant".
Constraints
Sample Input:
Z
Sample Output:
Consonant
SOLUTION USING C LANGUAGE:-
#include <stdio.h>
int main(void) {
char c;
scanf("%c\n",&c);
if(c=='A'||c=='E'||c=='I'||c=='O'||c=='U')
printf("Vowel");
else
printf("Consonant");
// your code goes here
return 0;
}
No comments:
Post a Comment