用if语句实现:输出一个字符,如果是数字字符,就显示“这是个数字字符”
#include<stdio.h> int main() { char c; scanf("%c",&c); if(c>='0' && c<='9') { printf("这个是数字字符\n"); } return 0; }