文件名称:24game
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:4.84kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
1) 随机产生四个1-13的数,分别代表13张牌。
2) 提示玩家输入算式。
3) 判断玩家输入的表达式是否合法,其中算式中的四个数字只能是程序所给的四个数字,非法则回到1)。
4) 如果玩家认为这四张牌算不出24点(如:1,1,1,1),可只输入?,程序将判断这四张牌是否能得出24点,如果能,则程序将给出算式,如果不能,说明不能,并回到1)。
5) 当用户正确输入算式后,用“堆栈来求表达式的值”的原理 求出结果并判断是否为24,得出用户是输是赢的结果。
6) 询问用户是否继续,是则回到1),否则结束程序。
-1) randomly generated a number of four 1-13 representing 13 licenses.
2) Players are prompted to enter the formula.
3) to determine whether the players enter the legitimate expression, which in the formula can only be four digits of the four procedures to the number of illegal then back 1).
4) If the licensing of four players that can not count 24 points (for example: 1,1,1,1), can be input only? , The program will determine whether this card can come four 24-point, if we can, then the procedure will be given formula, if not, that can not, and return to 1).
5) When the user enter the correct formula, the use of "stack to seek expressions of value" principle and to determine whether the results obtained for 24, to draw customers to win or lose, it is the result.
6) asking the user whether or not to continue, is the return to 1), otherwise the end of the procedure
2) 提示玩家输入算式。
3) 判断玩家输入的表达式是否合法,其中算式中的四个数字只能是程序所给的四个数字,非法则回到1)。
4) 如果玩家认为这四张牌算不出24点(如:1,1,1,1),可只输入?,程序将判断这四张牌是否能得出24点,如果能,则程序将给出算式,如果不能,说明不能,并回到1)。
5) 当用户正确输入算式后,用“堆栈来求表达式的值”的原理 求出结果并判断是否为24,得出用户是输是赢的结果。
6) 询问用户是否继续,是则回到1),否则结束程序。
-1) randomly generated a number of four 1-13 representing 13 licenses.
2) Players are prompted to enter the formula.
3) to determine whether the players enter the legitimate expression, which in the formula can only be four digits of the four procedures to the number of illegal then back 1).
4) If the licensing of four players that can not count 24 points (for example: 1,1,1,1), can be input only? , The program will determine whether this card can come four 24-point, if we can, then the procedure will be given formula, if not, that can not, and return to 1).
5) When the user enter the correct formula, the use of "stack to seek expressions of value" principle and to determine whether the results obtained for 24, to draw customers to win or lose, it is the result.
6) asking the user whether or not to continue, is the return to 1), otherwise the end of the procedure
(系统自动生成,下载前可以参看下载内容)
下载文件列表
24game.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.