,这个指针与字符串好难,简单一点单符合要求的各位

img

逐个字符比较就好了啊

#include <stdio.h>
char yy[11] = "AEIOUaeiou";
int getNum(char *s)
{
    int i=0,j=0,count=0;
    while(s[i] != 0)
    {
        for(j=0;j<10;j++)
            if(s[i] == yy[j])
            {
                count++;
                break;
            }
        i++;
    }
    return count;
}
int main()
{
    char s[1000];
    int count = 0,n,i;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        gets(s);
        count = getNum(s);
        printf("%d\n",count);
    }
    return 0;
}