pascal 读入一串数字,以句号结束,请统计其中‘0’到‘9’的各个数字的个数.
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/10/06 20:47:09
pascal 读入一串数字,以句号结束,请统计其中‘0’到‘9’的各个数字的个数.
读入一串数字,以句号结束,请统计其中‘0’到‘9’的各个数字的个数.如输入:91254782354987012345978.输出:0:1 1:2 2:3 3:2 4:3 5:3 7:3 8:3 9:3
读入一串数字,以句号结束,请统计其中‘0’到‘9’的各个数字的个数.如输入:91254782354987012345978.输出:0:1 1:2 2:3 3:2 4:3 5:3 7:3 8:3 9:3
var s:string; a:array [0..9] of longint; i:longint; begin readln(s); fillchar(a,sizeof(a),0); for i:=1 to length(s)-1 do inc(a[ord(s[i])-48]); for i:=0 to 8 do if a[i]0 then write(i,':',a[i],' '); if a[9]0 then write('9:',a[9]); writeln; end.
pascal 读入一串数字,以句号结束,请统计其中‘0’到‘9’的各个数字的个数.
Pascal输入一串字符,结束,分别统计其中数字(0,1,2,.9)出现的次数
读入一些正整数(以0为结束标志),统计其中的偶数个数,以及奇数个数.c语言的题目
用PASCAL做!读入一英文句子,单词之间用空格或逗号隔开,统计其中单词个数,并输出各个字母出现的频率.
PASCAL 集合 1.编写一个译码程序,将输入的一串字符,(只有小写字母、数字和空格,输入时以句号结束)翻译成原码.译
输入一篇英文文章,以$符号结束,统计其中出现字母,数字的个数,求出现频率最高的字母
pascal 编程 1、统计1到200000000之间只含有数字0和1的这些的数的个数,如1,10,11,100等.2、
用C语言编写:输入一行字符以@作结束标志,分别统计其中英文字母、空格、数字和其他字符的个数.
"读入一系列整数,统计出正整数个数i和负整数个数j,读入0则结束."用C++写的代码.为什么运行不出结果呢?
Pascal编程:读入N个数,打印其中的最大数及其位置号
用excel怎样在一串很长的不同的数字中统计出各个数字的出现个数?
统计以某数字开头的单元格个数