登录
首页 » Visual C++ » 2.3

2.3

于 2010-11-03 发布 文件大小:1KB
0 214
下载积分: 1 下载次数: 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.)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • shooting_game
    射击游戏,简单的射击游戏,杀日本鬼子的,娱乐一下。(shooting japanese game.)
    2016-05-05 14:14:53下载
    积分:1
  • chaojimali
    用VB仿超级玛丽游戏,虽然界面和真正的玛丽游戏比起来有点差,但游戏的控制还算可以了,基本都实现了。(VB with games like Super Mario, although the interface and the real Mary a little bit worse than the game, but still can control the game, and basically realized.)
    2009-05-21 03:03:59下载
    积分:1
  • 675646545
    VB反应能力测试小游戏,打地鼠源代码.有需要的下.(VB reaction capability test game, play hamster source code are in need.)
    2013-08-23 17:56:27下载
    积分:1
  • gobang-game
    基于控制台的五子棋游戏,用easyX提供的图形接口进行编写,适合初学者,简单易懂,注释全面。注:安装图形库需要去EasyX官网下载“2012立冬版”,必须是这个版本,因为后来新的版本对有些函数做了调整,导致显示会有问题。(Console-based backgammon game, the graphical interface provided by easyX be written for beginners, easy to understand, comprehensive notes. Note: Installing graphics libraries need to EasyX official website to download " 2012 Lidong Edition" , must be this version, because the new version was made adjustments for some functions, resulting in the display there will be problems.)
    2014-10-11 14:53:47下载
    积分:1
  • 6603xiaojiu
    6603xiaojiu source code
    2019-02-23 21:33:39下载
    积分:1
  • yanhua
    可惜一开始没能画成圆,所以整个过程都是菱形的变换,希望大家多多指教,能够想办法把初始状态就围成一个圆(Unfortunately, the beginning could not draw into a round, so the whole process is the diamond transformation, we hope the exhibitions, to be able to think of a way to put the initial state is surrounded by a circle)
    2013-02-23 18:24:04下载
    积分:1
  • llk
    自己用c写的一个在windows下运行的连连看游戏程序(They used to write c lianliankan game program running under windows.)
    2015-04-04 10:25:35下载
    积分:1
  • chenjie
    一个简单的龚 GDI 开发的一个小游戏,喜欢的大家分线一下。(无)
    2010-08-11 13:26:46下载
    积分:1
  • game
    基于CGX库的推箱子游戏. CGX库源码已在之前上传了. (CGX library based on the game Sokoban. CGX source database has been uploaded before.)
    2009-05-13 17:05:58下载
    积分:1
  • brick
    这是一个俄罗斯方块的游戏,用VC++MFC编写的(This is a game)
    2009-07-13 21:23:11下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载