文件名称:Insert-the-operator
- 所属分类:
- JSP源码/Java
- 资源属性:
- [WORD]
- 上传时间:
- 2012-11-29
- 文件大小:
- 46kb
- 下载次数:
- 0次
- 提 供 者:
- 唐*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
插入运算符使等式成立课程设计实验报告
设计程序在表达式“123456789=a”中左边的适当位置插入运算符“+”“-”或“*”,以使等式成立,列出所有可能情况。例如:当a=1000时,123+45-67+8-9=100。
在小学就遇到过这样的问题,只是那时遇到的这样的问题使很简单的,没有乘,并且现在的程序要求的使把所有符合条件的答案都选出来。所以可以考虑使用编写的程序来解决问题。
首先问题的左边是“123456789”中插入适当的运算符,可以想象成有123456789这九个人按顺序站着,然后在他们中间插入木板,木板分别为:“+”,“-”,“*”。把木板出入后就构成了一个表达式,然后通过特定的函数来筛选能够使等式成立的表达式,并输出。 -Insert the operator equation was established to course design experiment report design procedure in the expression "123456789 = a" on the left in the appropriate position insertion operator "" and"- "or"* ", in order to make equation was established, the list of all possible situation. For example: when a = 1000, 123 45-67 8-9 = 100. In elementary school is encountered such a problem, but then encountered such a problem that very simple, not by, and now the process requirements of all meet the conditions of the answers are chosen to. So consider using program to solve the problem. The first problem left is "123456789" insert appropriate operator, can imagine 123456789 this nine people standing in sequence, and then in the midst of them into board, board respectively is: "","- ", "*". After the board in and out of an expression, and then through the specific function to screening can make equation established expression, and output.
设计程序在表达式“123456789=a”中左边的适当位置插入运算符“+”“-”或“*”,以使等式成立,列出所有可能情况。例如:当a=1000时,123+45-67+8-9=100。
在小学就遇到过这样的问题,只是那时遇到的这样的问题使很简单的,没有乘,并且现在的程序要求的使把所有符合条件的答案都选出来。所以可以考虑使用编写的程序来解决问题。
首先问题的左边是“123456789”中插入适当的运算符,可以想象成有123456789这九个人按顺序站着,然后在他们中间插入木板,木板分别为:“+”,“-”,“*”。把木板出入后就构成了一个表达式,然后通过特定的函数来筛选能够使等式成立的表达式,并输出。 -Insert the operator equation was established to course design experiment report design procedure in the expression "123456789 = a" on the left in the appropriate position insertion operator "" and"- "or"* ", in order to make equation was established, the list of all possible situation. For example: when a = 1000, 123 45-67 8-9 = 100. In elementary school is encountered such a problem, but then encountered such a problem that very simple, not by, and now the process requirements of all meet the conditions of the answers are chosen to. So consider using program to solve the problem. The first problem left is "123456789" insert appropriate operator, can imagine 123456789 this nine people standing in sequence, and then in the midst of them into board, board respectively is: "","- ", "*". After the board in and out of an expression, and then through the specific function to screening can make equation established expression, and output.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Insert the operator.doc