文件名称:guess_number
介绍说明--下载内容均来自于网络,请自行研究使用
猜数位
首先自动产生一个n位0-9数字,每位上的数字互不相同。
然后,程序接受玩家输入所猜测的n位不重复的数字;
接着,由程序比对符合的位数以及不符合但有出现的数字的数量。完全符合的数字会以A来表示,而不符合正确位置但有出现的数字则以B来表示。举例,如果正确答案是2345且玩家猜的是4395,则会得到2A1B。
最后,玩家在m次内猜测出完全相符的数字组合即为胜利。若没有在指定m回合完成,则给出准确答案。
注:m,n可以由玩家自行设定。若不设定,其缺省为n=4;m=12。
-Guess automatically generate a digital first n bits 0-9, each different each other on the digital. Then, the program accepts player input n bits guess not duplicate numbers then, in line with the program than the number of places and do not meet, but there appear numbers. Fully compliant with Digital A will be represented, but not in line with the correct location of the figures appear to indicate places B. For example, if the correct answer is 2345 and the players guess is 4395, you get 2A1B. Finally, the players in the m guessing a combination of numbers is entirely consistent victory. If not completed in the specified m bout, give accurate answers. Note: m, n can be set by the players themselves. If not set, it defaults to n 4 m 12.
首先自动产生一个n位0-9数字,每位上的数字互不相同。
然后,程序接受玩家输入所猜测的n位不重复的数字;
接着,由程序比对符合的位数以及不符合但有出现的数字的数量。完全符合的数字会以A来表示,而不符合正确位置但有出现的数字则以B来表示。举例,如果正确答案是2345且玩家猜的是4395,则会得到2A1B。
最后,玩家在m次内猜测出完全相符的数字组合即为胜利。若没有在指定m回合完成,则给出准确答案。
注:m,n可以由玩家自行设定。若不设定,其缺省为n=4;m=12。
-Guess automatically generate a digital first n bits 0-9, each different each other on the digital. Then, the program accepts player input n bits guess not duplicate numbers then, in line with the program than the number of places and do not meet, but there appear numbers. Fully compliant with Digital A will be represented, but not in line with the correct location of the figures appear to indicate places B. For example, if the correct answer is 2345 and the players guess is 4395, you get 2A1B. Finally, the players in the m guessing a combination of numbers is entirely consistent victory. If not completed in the specified m bout, give accurate answers. Note: m, n can be set by the players themselves. If not set, it defaults to n 4 m 12.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
guess_number.exe
guess_number.cpp