Fork me on GitHub

统计命令行中第一参数所出现的英文字符个数

while (argc--) {

        char *str;

        int count=0;

        if(argc<2)exit(1);

        str=argv[argc];

        while (*str) {

            if(isalpha(*str++))

                count++;

            printf("\n字母个数:%d\n",count);

        }

    }    

posted on 2012-02-22 14:39  pengyingh  阅读(196)  评论(0)    收藏  举报

导航