题解 | #判断是不是字母#
判断是不是字母
https://www.nowcoder.com/practice/91a588dd4cd244bfa616f17603ec123c
#include <stdio.h> int main() { int b = 0;//使用getchar也不用过于担心数据类型 while ((b=getchar()) != EOF)//不使用scanf_s的原因是因为会识别空格 { getchar(); if (b >= 65 && b <= 122) { printf("%c is an alphabet.\n",b); } else { printf("%c is not an alphabet.\n",b); } } return 0; }