基本信息
源码名称:24点游戏.cpp
源码大小:8.29KB
文件格式:.cpp
开发语言:C/C++
更新时间:2021-04-06
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 2 元 
   源码介绍

(1)project124-point gameThe 24-point game is to pick any four cards from 52 cards, as shown in the figure below. Note that two Jokers are excluded. Each card represents a number. An Ace, King, Queen, and Jack represent 1, 13, 12, and 11, respectively. Enter an expression that uses the four numbers from the four selected cards. Each number must be used once and only once. You can use the operators (addition, subtraction, multiplication, and division) and parentheses in the expression. The expression must evaluate to 24. After entering the expression, click the Verify button to check whether the numbers in the expression are currently selected and whether the result of the expression is correct. Display the verification in a dialog box. Note that such an expression might not exist. In this case, click the Refresh button to get another set of four cards. Assume that images are stored in files named 1.png, 2.png, ..., 52.png, in the order of spades, hearts, diamonds, and clubs. So, the first 13 images are for spades 1, 2, 3, ..., and 13.

 

Your program should also enable the computer to display the expression if one exists, as shown in the figure. Otherwise, report that the expression does not exist.