题解 | #判断字母#
判断字母
https://www.nowcoder.com/practice/44d2d63103664913bc243d3836b4f341
#include <stdio.h>
int main() {
char ch;
while (scanf("%c", &ch) != EOF) {
getchar();
// char即chatacter的本质就是一个整数,只是通过ASCII编码使其映射到不同的字符
if (('A' <= ch && ch <= 'Z') || ('a' <= ch && ch <= 'z')) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}