判断字符串中数字的个数
#include<stdio.h>#include<string.h>
#include<ctype.h>
int main()
{
char a[1000];
int i,b,c;
scanf("%s",&a);
b=0;
c=strlen(a);
for(i=0;i<=c;i++)
{
if(isdigit(a[i]))
b=b+1;
}
printf("%d\n",b);
return 0;
}
大佬们,看一下有没有什么问题
2018-11-01 09:48
2018-11-01 11:53

2018-11-01 12:09
2018-11-01 22:40