题解 | #判断是不是字母#

判断是不是字母

http://www.nowcoder.com/practice/91a588dd4cd244bfa616f17603ec123c

#include<stdio.h>
#include<ctype.h>
int main()
{
    int ch;
    while(scanf("%c",&ch)!=EOF)
    {
        getchar();
        int ret=isalpha(ch);
        if(ret==0)
            printf("%c is not an alphabet.\n",ch);
        else
            printf("%c is an alphabet.\n",ch);
    }
    return 0;
}
全部评论
是char ch吧
点赞 回复 分享
发布于 2022-03-07 16:27

相关推荐

05-20 13:59
门头沟学院 Java
米黑子米黑子:你这个成绩不争取下保研?
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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