文件名称:guess_number
-
所属分类:
- 标签属性:
- 上传时间:2016-10-05
-
文件大小:454.59kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
猜数位
首先自动产生一个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
guess_number.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.