-
2.3
一个简单的猜数游戏程序:
利用Math.random()方法生成0-1之间的double型数dNum,将dNum转换为0-100之间的整数iNum。
利用KeyInput.readInt()方法接收键盘输入的整数inNum。如果inNum小于iNum,在屏幕上显示“输入的值小,请输入更大的数.”;如果inNum大于iNum,在屏幕上显示“输入的值大,请输入更小的数.”;如果inNum等于iNum,在屏幕上显示“猜对了.”,并结束运行。
猜测错误的时候,重新输入inNum,直到猜对为止。如果猜测10次后仍未猜对,显示“猜测次数已达10次,猜数失败.”,并结束程序的运行。
(A simple guessing game program: use Math.random () method to generate double-type numbers between 0-1 dNum, will dNum into an integer between 0-100 iNum. use KeyInput.readInt () method receives the keyboard input integer inNum. If inNum less than iNum, the screen " Enter the value of the small, enter the greater number." If inNum than iNum, the screen " Enter the value of the large number of smaller type." If inNum equal iNum, displayed on the screen, " guessed." and end the run. guess wrong, re-enter inNum, until you guess it right up. If the guess was right 10 times not to show " guess the number has reached 10 times, guess the number of failures." And end the program.)
- 2010-11-03 14:29:09下载
- 积分:1
-
vb-supermario
用VISUAL BASIC编写的超级马里奥(supermario by VISUAL BASIC)
- 2013-10-15 12:06:00下载
- 积分:1
-
tetris
用 cocos2d-x 3.4 开发的俄罗斯方块(Use cocos2d-x 3.4 development game tetris)
- 2015-02-26 14:45:26下载
- 积分:1
-
wenquxinggame
文曲星游戏,很有意思啊,大家来侃侃,提点意见啊,帮帮兄弟(star game, a very interesting ah, but there was elegance, Chidianyijian ah, help brothers)
- 2007-05-08 17:15:12下载
- 积分:1
-
BaiRenNiuNiu
网狐6602的百人游戏。希望对初学者或者游戏爱好者有所帮助(Fox Network 6602 hundred games. I hope to help beginners or gaming enthusiasts)
- 2013-12-09 14:00:04下载
- 积分:1
-
12324355
模拟飞机飞行的源程序(simulated flight of the source)
- 2004-12-18 13:15:55下载
- 积分:1
-
21pointMFC
21点游戏 sln vc++6.0打不开 用vs才行 下下来看看吧()
- 2013-12-27 15:49:53下载
- 积分:1
-
6_1
一个飞机小游戏,基本功能都有,就是界面不太好(An airplane game, the basic function of all is that the interface is not very good)
- 2011-05-21 19:05:12下载
- 积分:1
-
jds_snake
贪吃蛇是家喻户晓的益智类小游戏,选择这个题目一是为了将自己的所学知识加以运用,二是一直以来贪吃蛇这个游戏就深深地吸引着我,它的制作方法对于以前的我而言都是很神秘的。我希望通过自己的所学知识把它剖析开来,真真正正的了解它的本质和精髓。(Snake is a well-known puzzle games, select the topic first, to own the knowledge to be used, and second, the game Snake has always been deeply attracted to me, it' s making way for the past of me is very mysterious. I hope that, through their own analysis of the knowledge open to it to really understand the essence and the essence of it.)
- 2010-06-28 17:40:33下载
- 积分:1
-
tanshishezhidongfangbubai
这是一款具有登入和注册的贪吃蛇,而且有特效果实,增加了游戏的趣味性(This is a login and registration Snake)
- 2012-10-24 08:48:34下载
- 积分:1