#include <stdio.h>
main( )
{
int a,b,c;
char ch;
a=0;b=0;
while(ch!='*')
{
scanf("%c", &ch);
if((ch>=97&&ch<=122||ch>=65&&ch<=90)) a++;
else if (ch>=48&&ch<=57) b++;
}
printf("字母个数:%d\n数字符号个数:%d\n", a,b);
}
51页13题 输入一串字符,统计字母个数和数字个数,直到输入*为止
最新推荐文章于 2023-05-23 17:00:57 发布