C Program if else : "Check Given character is Vowel or Not" with output
#include <stdio.h>
int main() { char ch; 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 a vowel.\n", ch); } else { printf("%c is not a vowel.\n", ch); } return 0; }Enter a character: A
A is a vowel.
Comments
Post a Comment