登录
首页 » Visual C++ » 2.3

2.3

于 2010-11-03 发布 文件大小:1KB
0 213
下载积分: 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 个回复

  • XAML-D3D-shootinggame
    D3D射击游戏源代码,特点是使用了xaml做界面。(D3d shooting game use xaml)
    2013-08-01 11:24:16下载
    积分:1
  • Simples-Base-Sudden-Attacker
    simple base of game hack
    2012-09-09 22:02:39下载
    积分:1
  • Surakarta
    苏拉卡尔塔棋的源码,可实现人机对战,和搜索树的层次选择(Surakarta chess source code, enabling crew war, and the level of the search tree selection)
    2020-10-23 09:07:22下载
    积分:1
  • lianliankan
    连连看的VB源代码,想要学习的朋友们赶紧了(VB code of lianlinakan ,a famous game in China)
    2010-01-01 20:35:33下载
    积分:1
  • QQ
    说明:  个完全开源的交互聊天软件 ,仿QQ版增加了服务器互联的功能,增加了服务器互连的功能,同时去掉了服务器集群的功能 增加了群组的功能,包括聊天室和游戏大厅 ,增加了一个网络五子棋游戏,改正了在有些网络环境下,每5分钟左右自动掉线的问题.(Fully interactive open-source chat software, an increase of imitation QQ server version of the function of the Internet, an increase of the interconnection functions of the server at the same time removed the functions of server clusters increase the group s functions, including chat rooms and gaming hall, an increase of a network Gobang games, corrected in some network environment, every 5 minutes automatically dropped the issue.)
    2008-12-01 08:34:59下载
    积分:1
  • shadeTree
    shadeTree的代码,内附模型文件。取自OptiX光线追踪引擎。(shadeTree code, enclosing model file. From the OptiX ray tracing engine.)
    2016-05-26 17:43:44下载
    积分:1
  • worldguard-5.7.3
    worldedit java plugin
    2013-07-27 22:15:42下载
    积分:1
  • MFC_Othell14882010282002
    this is small othello game. you can see the source and everything pls download it and learn
    2012-03-31 21:56:42下载
    积分:1
  • MY-Project
    俄罗斯方块游戏的c++简单实现,参考学习很有价值(Tetris game c++ simple realization, learning valuable reference)
    2013-09-09 09:51:59下载
    积分:1
  • SingleNumber
    找出只出现一次的数字,其他数字均出现了2次,时间空间尽量少(Identify only appears once, while other figures have appeared two times to minimize time and space)
    2013-10-24 09:01:25下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载