登录
首页 » Visual C++ » 2.3

2.3

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

  • 五个比较好玩的小games
    五个比较好玩的小游戏 反序数设计 猜数游戏 魔方 火箭 3D台球 均用C实现(Five more fun little game against ordinal number guessing game cube rocket design 3D billiards were implemented in C)
    2013-08-02 10:32:30下载
    积分:1
  • three
    这个包括头文件,以及具体的实现函数(This is a chess game, three sons and a chess game, I hope you all like.)
    2012-02-22 18:34:16下载
    积分:1
  • Poolcode
    3D台球游戏,功能完整,代码完整,需要的同学可以下载进去学习~~(3D Billiards Game, functional integrity, code integrity, and required the Student can be downloaded into the study ~ ~)
    2009-03-11 15:20:25下载
    积分:1
  • Windows编程大师技巧(第二版)
    windows下游戏编程的好书,需要的朋友可以下载(windows under game programming books, a friend in need can be downloaded)
    2020-06-26 09:40:02下载
    积分:1
  • eluosi
    用c++编写的俄罗斯方块小游戏,有兴趣的可以学习下(With c++ Tetris game, interested can learn under)
    2013-10-15 22:11:42下载
    积分:1
  • Tetris-c
    俄罗斯方c语言代码加详解,非常好的俄罗斯方块代码(Russian side c language code plus detailed, very good Tetris code)
    2013-11-27 18:32:17下载
    积分:1
  • elsfk带算法
    很多编程爱好者都编写过俄罗斯方块的游戏程序。很久以前,我用Tc2.0也做过一个;最近有好些朋友看见我以前的俄罗斯方块的程序后, 问我是怎么做的。我一直想把这个程序的整个过程写一份详细的东西,(many programming enthusiasts are prepared off Tetris game procedures. A long time ago, I used a Tc2.0 have done; Recently, I saw some friends of the Russian block before the procedures and asked how I was doing. I always wanted to turn the whole process procedures for writing a detailed things,)
    2005-03-23 11:20:48下载
    积分: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
  • JigsawPuzzle
    说明:  用VB实现3乘3的拼图游戏,以前VB课程设计的时候做的,用了一个叫PictureClip的控件。(Using VB to achieve 3 by 3 puzzle, before, when VB program to do the design, uses a control called PictureClip.)
    2010-05-04 22:05:05下载
    积分:1
  • shudu
    一个数独游戏的源码程序,有兴趣的朋友可以下来看看(A Sudoku game source program, interested friends can look down)
    2014-02-27 10:58:56下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载