用条件判断语句呀,你用什么语音?比如C语言首先定义一个输入变量char input;if(input=='A'||input=='E'||input=='I'||input=='O'||input=='U'){printf("元音");}else{printf("辅音");}依葫芦画瓢