#include <stdio.h>
void main()
{
char x;
printf("请输入一个字符:");
scanf("%c",&x);
if('x'>=65&&'x'<=122)
printf("%c是字母",x);
else if('x'>=48&&'x'<=57)
printf("%c是数字",x);
else if('x'>=0&&'x'<=255)
printf("%c是其他字符",x);
}
实例069 检查字符类型
最新推荐文章于 2024-09-15 22:16:28 发布