-
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
-
Skyblue_Mine
一个简单的VC游戏程序,供学习和娱乐使用。(A simple VC game program for both study and entertainment.)
- 2009-12-03 18:50:42下载
- 积分:1
-
QPWeb
网狐原版网站后台,绝对完整!超值!!!!(code wh web aaaaaaa)
- 2010-03-15 19:35:20下载
- 积分:1
-
RunningMatchmen
火柴人的跳跃和滚动 按s滚动躲避障碍 按w跳跃躲避障碍(Stickman jumping and rolling)
- 2013-12-12 20:24:23下载
- 积分:1
-
game
简单写的一个横版过关的小游戏,适合新手学习,用DX写的,实现了基本的行走,怪物等(Simple to write a horizontal version of the game to cross the border, suitable for novice to learn to write DX, basic walking monsters)
- 2012-06-25 16:03:54下载
- 积分:1
-
BWChess
C++开发的BWChess黑白棋游戏,界面差不多,功能挺多的,可以与电脑下棋也可以人与人对战,可以提醒,记录对战排行榜。(C++ development BWChess Reversi game, the interface is similar to the挺多function, you can play chess with the computer can also be against people can be reminded to record against the list.)
- 2009-07-12 11:13:40下载
- 积分:1
-
vb-supermario
用VISUAL BASIC编写的超级马里奥(supermario by VISUAL BASIC)
- 2013-10-15 12:06:00下载
- 积分:1
-
RobotViewCoDE
机器人避让障碍物的一个测试程序,主要关注的是算法本身,测试的时候只要点击设定里面的设置障碍物然后寻道即可。(Robot avoid obstacles a test procedure, the main concern is the algorithm itself, the test set when clicking inside the obstacle and then seek to set up.)
- 2013-07-03 11:47:15下载
- 积分:1
-
gameScheme
小伟报名参加中央电视台的智力大冲浪节目,本次挑战赛吸引了众多参赛者,主持人为了表彰大家的勇气,先奖励每个参赛者m元。先不要太高兴!因为这些钱还不一定都是你的!接下来主持人宣布了比赛规则:
首先,比赛时间分为n个时段(n≤500),它又给出了很多小游戏,每个小游戏都必须在规定期限ti前完成(1≤ti≤n)。如果一个游戏没能在规定期限前完成,则要从奖励费m元中扣去一部分钱wi,wi为自然数,不同的游戏扣去的钱是不一样的。当然,每个游戏本身都很简单,保证每个参赛者都能在一个时段内完成,而且都必须从整时段开始。主持人只是想考考每个参赛者如何安排组织自己做游戏的顺序。作为参赛者,小伟很想赢得冠军,当然更想赢取最多的钱!注意:比赛绝对不会让参赛者赔钱!
(Xiaowei enroll CCTV intellectual big surf program, The Challenge has attracted many participants, we commend the courage to host first award each participant m, respectively. Let us not be too happy! Because these are not necessarily paying the money you! Then the host announced the rules of the game:
First, the game is divided into n time periods (n ≤ 500), it also gives a lot of games, each game must be completed before the specified period ti (1 ≤ ti ≤ n). If a game could not be completed before the specified period, the deduction from the fee m-ary part of the money in reward wi, wi is a natural number, different game deduct money is not the same. Of course, every game itself is very simple, to ensure that each participant can be completed within a period of time, but must start from the entire period. Moderator just want to quiz each participant how to make their own arrangements for the organization of the game in order. As a participant, Xiaowei wanted to win, of course, want t)
- 2013-12-01 20:10:44下载
- 积分:1
-
MemWord
Game Memories Words with dics
- 2010-08-13 03:22:43下载
- 积分:1