题解 | 判断是元音还是辅音

判断是元音还是辅音

https://www.nowcoder.com/practice/7eb4df4d52c44d309081509cf52ecbc4

#include <stdio.h>
#include <string.h>
int main()
{
    char yuan[11]={'a','e','i','o','u','A','E','I','O','U'};
    int len=strlen(yuan);
    char ch;
    int i;
    while(scanf("%c",&ch)!=EOF)
    {
        if(ch=='\n'||ch==' '||ch=='\t')
        {
            continue;
        }
        for(i=0;i<len;i++)
        {
            if(yuan[i]==ch)
            {
                printf("Vowel\n");
                break;
            }
        }
        if(i==len)
        {
            printf("Consonant\n");
        }
        i=0;
    }
    return 0;
}

全部评论

相关推荐

UtopianYou...:这个简历排版真的不太行哦,去找免费的或者花点小钱,把排版弄整齐一点吧,看着舒服。
点赞 评论 收藏
分享
zaakfung:26届不应该春招吗 为啥还实习
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务