发布网友 发布时间:2022-04-23 02:24
共1个回答
热心网友 时间:2023-10-11 15:18
#include <stdio.h>
#include <string.h>
int main()
{
void vowels(char strng[]);
char c[81];
printf("intput something:");
while (gets(c))
vowels(c);
return 0;
}
void vowels(char strng[])
{
int i = 0, k = 0;
int s = 0;
char c;
do
{k = 0;
while ((c = strng[i++]) != '\0'&c != ' ')
switch (c)
{
case'a':
case'e':
case'i':
case'o':
case'u':
putchar(c); k++; s++;
}
putchar('\n');
printf("元音字母数:%d 总数:%d\n", k, s);
while(strng[i]==' ') i++;
}while (c != '\0');
return;
}