C 语言实例20 - 判断字母
2022-12-06 本文已影响0人
刘禹锡_c886
#include <stdio.h>
int main()
{
char c ;
printf("请输入:");
scanf("%c",&c);
if((c >= 'a' && c <='z') || (c >= 'A' && c <= 'Z')){
printf("%c是字母\n",c);
}else{
printf("%c不是字母\n",c);
}
return 0;
}