统计文本文件中单词个数以及小写字母a,b打头的单词个数,txt自己乱设

[复制链接]
查看11 | 回复1 | 2009-3-19 19:12:18 | 显示全部楼层 |阅读模式
完成后追30分
pascal的 输出样例:在1个txt中输入1串字符如:about body cms sdf在另1个txt中输a:1,b:1total:4打错了555,速度阿

回复

使用道具 举报

千问 | 2009-3-19 19:12:18 | 显示全部楼层
我起的名字叫zd,输入文件为zd.txt,输出为3行,你要想改成1行就把writeln改为write就行了。 program wood; var total,m:integer; s:string; i:char; a:array['a'..'z'] of integer; begin assign(input,'zd.txt'); assign(output,'zd.out'); reset(input); rewrite(output); read(s); fillchar(a,sizeof(a),0); while s'' do begin m:=pos(' ',s); if m...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行