文件名称:1_3
-
所属分类:
- 标签属性:
- 上传时间:2014-06-30
-
文件大小:1.24kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
栈的实现及应用
栈是一种常用的线性表,在操作系统中被大量使用,比如计算各种表达式。设计程序完成一个24点游戏,要求用户将四个随机产生的十以内的整数进行加减乘除(允许使用括号,每个数只能用一次)求得二十四。(注:可以不判断录入的表达式是不是只使用了给定的四个数或者使用了多次数)
功能要求:
(1)随机产生四个数(使用randomize和random函数);
(2)要求用户录入表达式,只能使用括号,加,减,乘和除;
(3)将中序算术表达式变成逆波兰式(也就是后序算术表达式);
(4)使用栈求解逆波兰式(求解过程可以判定是否只用了给定的数);
(5)按答案输出 True 或者 False。
提高:该完成该项目时,思考用户可能会录入哪些让你想不到的数据?-Stack implementation and application stack is a commonly used linear form, has been widely used in the operating system, such as the calculation of various expressions. Design process to complete a 24-point game, the user will be required within four integers ten randomly generated for addition and subtraction, multiplication and division (allowing the use of brackets, each number can only be used once) obtained XXIV. (Note: You can not judge entered expression is not only using the given four times the number or use the multi-) functional requirements: (1) randomly generated four numbers (using randomize and random function) (2) requires User input expression can only use parentheses, add, subtract, multiply and divide (3) in order to become a reverse Polish arithmetic expressions (that is, after the sequence of arithmetic expressions) (4) the use of the stack for solving inverse Poland formula (solving process can be used only to determine whether a given number) (5) True or outp
栈是一种常用的线性表,在操作系统中被大量使用,比如计算各种表达式。设计程序完成一个24点游戏,要求用户将四个随机产生的十以内的整数进行加减乘除(允许使用括号,每个数只能用一次)求得二十四。(注:可以不判断录入的表达式是不是只使用了给定的四个数或者使用了多次数)
功能要求:
(1)随机产生四个数(使用randomize和random函数);
(2)要求用户录入表达式,只能使用括号,加,减,乘和除;
(3)将中序算术表达式变成逆波兰式(也就是后序算术表达式);
(4)使用栈求解逆波兰式(求解过程可以判定是否只用了给定的数);
(5)按答案输出 True 或者 False。
提高:该完成该项目时,思考用户可能会录入哪些让你想不到的数据?-Stack implementation and application stack is a commonly used linear form, has been widely used in the operating system, such as the calculation of various expressions. Design process to complete a 24-point game, the user will be required within four integers ten randomly generated for addition and subtraction, multiplication and division (allowing the use of brackets, each number can only be used once) obtained XXIV. (Note: You can not judge entered expression is not only using the given four times the number or use the multi-) functional requirements: (1) randomly generated four numbers (using randomize and random function) (2) requires User input expression can only use parentheses, add, subtract, multiply and divide (3) in order to become a reverse Polish arithmetic expressions (that is, after the sequence of arithmetic expressions) (4) the use of the stack for solving inverse Poland formula (solving process can be used only to determine whether a given number) (5) True or outp
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1_3.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.