题解 | #判断是元音还是辅音#
判断是元音还是辅音
https://www.nowcoder.com/practice/7eb4df4d52c44d309081509cf52ecbc4
#include <stdio.h> int main() { char c = 'B'; char str[] = "AEIOUaeiou"; while (scanf("%c",&c)!=EOF) { getchar(); int i = 0; while (str[i]) { if (c == str[i]) { printf("Vowel\n"); break; } i++; } if (str[i] == '\0') printf("Consonant\n"); } return 0; }