Write C Program To Check Inputed Character is Vowel Or Not
1: int main()
2: {
3: char ch;
4: printf("Enter a character");
5: scanf("%c", &ch);
6: if (ch == 'a' || ch == 'A' || ch == 'e' || ch == 'E' || ch == 'i' || ch == 'I' || ch =='o' || ch=='O' || ch == 'u' || ch == 'U')
7: printf("%c is a vowel", ch);
8: else
9: printf("%c is not a vowel.", ch);
10: return 0;
11: }
No comments:
Post a Comment