利用switch语句判断给定的字符是否为元音字符(a,e,i,o,u)

不知道为什么运行不出来
#include <stdio.h>
int isvowel(char c)
{int is;
switch(c)
{case 'a':
case 'e':
case 'i':
case 'o':
case 'u':
is=1;
break;
default:is=0;
}
return is;
}


#include <stdio.h>
int isvowel(char c)
{
    int is;
    switch (c)
    {
    case 'a':
    case 'e':
    case 'i':
    case 'o':
    case 'u':
        is = 1;
        break;
    default:
        is = 0;
    }
    return is;
}

int main(){
    char c;
    scanf("%c", &c);
    printf("%d", isvowel(c));
}

img


大概就是这样,输入元音字母返回1

额 代码是没问题的,我是可以调用的