STL -- isalpha()

判断是不是字母

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

判断是不是字母,不区分大小写

#include<iostream>
#include<cctype>
using namespace std;

int main()
{
    char s;
    while(cin >> s)
    {
        if(isalpha(s))    cout << s << " is an alphabet."  << endl;
        else cout << s << " is not an alphabet."  << endl;
    }

    return 0;
}
全部评论

相关推荐

11-03 12:40
中山大学 Java
勇敢的突尼斯海怪选钝...:楼主这拒意向话术好得体呀 !求问HR回复态度咋样呀
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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