#include <stdio.h>
int main(){
char c ;
printf("请输入字母:");
scanf("%c",&c);
if(c == 'a' || c == 'e' || c == 'i' || c== 'o' || c == 'u'){
printf("%c是元音\n",c);
}else{
printf("%c是辅音\n",c);
}
return 0;
}
#include <stdio.h>
int main(){
char c ;
printf("请输入字母:");
scanf("%c",&c);
if(c == 'a' || c == 'e' || c == 'i' || c== 'o' || c == 'u'){
printf("%c是元音\n",c);
}else{
printf("%c是辅音\n",c);
}
return 0;
}
本文标题:C 语言实例15 - 判断元音/辅音
本文链接:https://www.haomeiwen.com/subject/ibhufdtx.html
网友评论