Quantcast
Channel: CSDN博客推荐文章
Viewing all articles
Browse latest Browse all 35570

杭电2017

$
0
0
#include <stdio.h>
#include <string.h>
int main (void)
{
    int n,i,j,k,s;
    char a[10000];
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        s=0;
        scanf("%s",a);
        j=strlen(a);
        for(k=0;k<j;k++)
            if(a[k]>='0'&&a[k]<='9')   //判断是不是数字
                s++;
            printf("%d\n",s);
    }
    return 0;
}
作者:hncu1206401liuhao 发表于2013-4-21 10:10:45 原文链接
阅读:64 评论:0 查看评论

Viewing all articles
Browse latest Browse all 35570

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>