编写函数,判断某个给定字符是否为数字。
样例输入
9
样例输出
yes
1 #include<stdio.h> 2 int main(){ 3 char c; 4 scanf("%c",&c); 5 if(c>='0' && c<='9'){ 6 printf("yes"); 7 return 0; 8 } 9 else 10 return 0; 11 }
1 #include<stdio.h> 2 int main(){ 3 char c; 4 scanf("%c",&c); 5 if(c>='0' && c<='9'){ 6 printf("yes"); 7 return 0; 8 } 9 else 10 return 0; 11 }