C语言练习题题目:输入一行字符,分别统计出其中英文字母、空格、数字和其它字符的个数。 1.程序分析:利用while语句,条件为输入的字符不为'\n'. 2.程序源代码: #include "stdio.h" main() {char c; int letters=0,space=0,digit=0,others=0; printf("please input some characters\n"); while((c=get...
C语言练习题题目:输入一行字符,分别统计出其中英文字母、空格、数字和其它字符的个数。 1.程序分析:利用while语句,条件为输入的字符不为'\n'. 2.程序源代码: #include "stdio.h" main() {char c; int letters=0,space=0,digit=0,others=0; printf("please input some characters\n"); while((c=getch...
/*题⽬:输⼊⼀⾏字符,分别统计出其中英⽂字母、空格、数字和其它字符的个数*/ int main() { system("color 1F"); // 设定显⽰框为蓝底⽩字 system("mode con cols=80 lines=30"); //固定显⽰框尺⼨ /***程序主体分割线(顶部)***/ int l,i,n1,n2,n3,n4;char s[100...
#include<stdio.h>#include<stdlib.h>/*题目:输入一行字符,分别统计出其中英文字母、空格、数字和其它字符的个数*/intmain() { system("color 1F");//设定显示框为蓝底白字system("mode con cols=80 lines=30");//固定显示框尺寸/***程序主体分割线(顶部)***/intl,i,n1,n2,n3,n4;chars[100];while...