题解 | #判断是元音还是辅音#
判断是元音还是辅音
https://www.nowcoder.com/practice/7eb4df4d52c44d309081509cf52ecbc4
#include <stdio.h> int main() { char s[] = "AaEeIiOoUu"; char ch = 0; while (scanf(" %c", &ch)!= EOF) { int i = 0; for(i = 0; i < 10; i++) { if (ch == s[i]) { printf("Vowel\n"); break; } } if (i == 10) { printf("Consonant\n"); } } return 0; }
C语言基础 文章被收录于专栏
里面较为详细的介绍了c语言的相关用法和有关题目。