题解 | 判断是不是字母
判断是不是字母
https://www.nowcoder.com/practice/91a588dd4cd244bfa616f17603ec123c
#include <stdio.h>
int main() {
char ch;
while(scanf("%c\n",&ch)!=EOF){
if(ch>='A'&&ch<='z')
printf("%c is an alphabet.\n",ch);
else
printf("%c is not an alphabet.\n",ch);
}
return 0;
}
多组输入用循环,ASCII编码中大写字母比小写字母小,所以最小的是大A,最大的是小z。
#卷__卷不过你们,只能卷__了#