#include<stdio.h>
#include<string.h>
int main( )
{
int N;
char ch[200];
scanf("%d",&N);
while(N--)
{
int n=0,i;
scanf("%s",ch);
for(i=0;ch[i]!='\0';i++)
if(ch[i]>='0'&&ch[i]<='9')
n++;
printf("%d\n",n);
}
return 0;
}
字符串统计
程序员文章站
2024-02-27 17:55:21
...
转载于:https://www.cnblogs.com/tangcong/archive/2011/04/28/2031916.html