c语言初学者,请教一下一个问题
1、输入一行字符,分别统计出其中英文字母、空格、数字和其他字符的个数
你要求的程序与运行结果如下:
#include <stdio.h>
int main()
{
int i=0, space=0, num=0, n=0, ch=0;
char s[20];
printf("Enter a string of characters:");
gets(s);
while(s[i] != '
1、输入一行字符,分别统计出其中英文字母、空格、数字和其他字符的个数
你要求的程序与运行结果如下:
#include <stdio.h>
int main()
{
int i=0, space=0, num=0, n=0, ch=0;
char s[20];
printf("Enter a string of characters:");
gets(s);
while(s[i] != '