C统计元音字母个数
#include<ctype.h>
#include<stdio.h>
int main()
{
int num = 0;
char ch;
printf("Enter a sentence:");
while((ch = getchar()) != '\n')
switch (toupper(ch)){
case 'a': case 'e': case 'i': case 'o': case 'u':
num++; break;
}
printf("Value of expression:%d\n",num);
return 0;
}
统计一句话中元音字母的个数,帮我看看