输入一个字符串统计字符串里的数字的个数。
#include "string.h"main()
{
char str[30];
int i,count=0;
scanf("%s",str);
for(i=0;i<strlen(str);i++);
{
if(str[i]>='0'&&str[i]<='9')
count++;
}
printf("%d\n",count);
system("pause");
}
请问这个程序有什么问题,为什么输出来是0
2013-07-07 13:37

2013-07-07 13:47
2013-07-07 14:05
2013-07-08 12:40