帮忙翻译,快,专业人士进,不要机翻

[复制链接]
查看11 | 回复1 | 2008-10-7 20:27:02 | 显示全部楼层 |阅读模式
有关c语言的
Text Processing
Write a program that reads a text file that contains some texts. The program should count the number of lines, number of words, number of characters (no spaces), number of characters with spaces and the number of paragraphs. This program should be similar to the word count function in Microsoft Word. These results should be written to another file.
A sample run of the program should look like this:
Please enter the file name: words.txt
Processing….
The results can be found at words.rpt
If the file “words.txt” contains:
In artificial intelligence ,an embodied agent is an intelligent agent , that interacts with the environment through a physical body within that environment. Agents that are represented graphically with a body, for example a human or a cartoon animal, are also called embodied agents, although they have only virtual, not physical, embodiment. A branch of artificial intelligence focuses on empowering such agents to interact autonomously with human beings , and the environment.
Mobile robots , are one example of physically embodied agents; Ananova , and Microsoft Agent ,are examples of graphically embodied agents. Embodied Conversational agents are embodied agents (usually with a graphical front-end as opposed to a robotic body) that are capable of engaging in conversation with one another and with humans employing the same verbal and nonverbal means that humans do (such as gesture, facial expression, and so forth).
Then file “words.rpt” should contain:
Number of words: 137
Number of characters not including space: 780
Number of characters including spaces: 916
Number of paragraphs: 2
Number of lines: 12

回复

使用道具 举报

千问 | 2008-10-7 20:27:02 | 显示全部楼层
Text Processing 数据处理写一个程序读一个文本文件 此程序必须统计行数,单词数,字符数(含空格),字符数(不含空格),段落数。程序须类似于微软的WORD中字数统计功能。结果须写入另外一个文件中。一个例如下。Please enter the file name: words.txt Processing…. The results can be found at words.rpt 剩下的那个words.txt 中包含的东西没用 只是一篇文章。 words.rpt 就是统计上文中的单词数,字符数,字符数含空格,段落数,行数。...
回复

使用道具 举报

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

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行