题解 | #判断是不是字母#
判断是不是字母
http://www.nowcoder.com/practice/91a588dd4cd244bfa616f17603ec123c
#include <stdio.h>
#include <ctype.h>
int main()
{
char ch = 0;
while (~scanf(" %c", &ch))
{
if (isalpha(ch))
{
printf("%c is an alphabet.\n", ch);
}
else
{
printf("%c is not an alphabet.\n", ch);
}
}
return 0;
}
编程初学者入门训练 文章被收录于专栏
针对编程初学者入门训练130题的代码详解专栏,内附注释方便理解,牛客130题的代码均用C语言实现,方便初学者学习。
查看10道真题和解析