大神帮一下忙,刚刚开始学,别编的太复杂
从键盘输入若干字符,统计英文字母、数字和其他字符的个数。要求用while或do…while循环语句实现
2018-04-26 18:39
程序代码:#include <stdio.h>
#include <stdlib.h>
int main()
{
int x= 0;
while(getchar()!='\n')
{
x++;
}
printf("有%d个字符\n",x);
return 0;
}
2018-04-26 18:50
2018-04-26 18:58
2018-04-26 21:49
2018-04-27 15:05
2018-04-28 11:45