本文介绍了[作业]使用VB 2008 Express Edition编写程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个必须在学校做的项目,问题是这样的,我在做生意,对编程我不太了解...问题是这样的吗?拜托,如果有人可以帮助我解决这个问题,我将非常感激……明天就要交……我不是说任何人都应该为我做这项工作,但是我我只是要求有关如何进行这项工作的一般步骤,因此请开始使用....谢谢!问题是要针对Centry Sentence Builder程序规范编写一个程序,该程序:

1-接受来自用户的单词作为控制台输入.
2-用户应该一次输入一个单词.
3-当用户输入完单词时,用户应该只需要按Enter键即可,而无需在行上输入其他内容,以表示输入过程已完成.
4-程序应将单词汇编并显示为单句.
5-句子中的单词应按键入时的顺序写出.
6-每个单词应以相反的字母写出.
7-应接受的最大单词数为64.
8-单词数超过64时,输入过程应结束.
9-在输入过程中,应提示用户输入每个单词.
10-用户输入单词后,应将每个单词回显到控制台.
11-回显的单词应具有字符>"在它前面.
12-最后一句应在其前面写上该句子为:".
13-在显示句子之后,应该有一个提示,告诉用户按Enter键最后退出程序.
14-显示提示后,控制台输出应保留在屏幕上,直到用户按下Enter键为止.
15-用户按下Enter键(提示时)后,程序应退出.
这是此类程序的控制台输出(用户输入以斜体显示)的示例-输入一个单词:
一个
>一个
输入
一个字:
两个
>两个
输入
一个字:
三个
>三个
输入
一个字:
四个
>四个
句子是:ruof eerht owt eno
*按Enter键退出* 

I have a project that I have to do in school and the question goes like this, I''m doing business and I don''t know much about programming...The question goes like this? Please, I would appreciate it so much if someone can put me through on how to go about this.... It''s due tomorrow...... I am not saying anybody should do the work for me but I''m only asking for general steps on how to do this work, getting started with it....Thanks!The question is to Cryptic Sentence Builder Program specification Write a program that:

1 - Accepts words from the user as console input.
2 - The user should enter ONE word at a time.
3 - When the user is finished entering words, the user should be able to just press the Enter key with no other input on a line to signal that the input process is finished.
4 - The program should assemble and display the words as a SINGLE sentence.
5 - The words of the sentence should be written out in the same order that they were typed in.
6 - Each individual word should be written out with its letters in reverse order.
7 - The maximum number of words that should be accepted is 64.
8 - The input process should end when the number of words exceeds 64.
9 - The user should be prompted to enter each word during the input process.
10 - Each word should be echoed back to the console after the user enters it.
11 - The echoed word should have the character ">" in front of it.
12 - The final sentence should be written out with "The sentence is:" in front of it.
13 - After displaying the sentence, there should be a prompt telling the user to press the Enter key to quit the program at the end.
14 - After displaying the prompt, the console output should remain on the screen until the user presses the Enter key.
15 - After the user presses the Enter key (when prompted to), the program should quit.
Here is an example of such a program''s console output (user input in italic)-Enter a single word: 
one
>one
Enter
a single word:
two
>two
Enter
a single word:
three
>three
Enter
a single word:
four
>four
the sentence is:ruof eerht owt eno
*press the Enter key to quit* 

推荐答案

使用列表存储用户输入的字符串,然后转储输出,只需对列表集合进行迭代,并使用循环对输出进行单词反转.

Use a list to store the strings the user entered, then to dump the output just iterate the list collection and word reversing the output using a loop.

所有有关此操作的信息都将在您的课程笔记中!

All the info to do this will be in your course notes!



这篇关于[作业]使用VB 2008 Express Edition编写程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 17:26