编写函数,判断某个给定字符是否为数字。
样例输入
9
样例输出
yes
#include <stdio.h>
int main(void)
{
char c;
scanf("%c",&c);
if('0' <=c && c<='9')
{
printf("yes");
return 0;
}
printf("no");
return 0;
}
编写函数,判断某个给定字符是否为数字。
样例输入
9
样例输出
yes
#include <stdio.h>
int main(void)
{
char c;
scanf("%c",&c);
if('0' <=c && c<='9')
{
printf("yes");
return 0;
}
printf("no");
return 0;
}