问题描述
编写函数,判断某个给定字符是否为数字。
样例输入
9
样例输出
yes
#include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) {char x; scanf("%c",&x); if('0'<=x&&x<='9') {printf("yes"); } else {printf("no"); } return 0; }
如果觉得《【c语言】蓝桥杯算法训练 判定数字》对你有帮助,请点赞、收藏,并留下你的观点哦!