登录
首页 » Visual C++ » 2.3

2.3

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

  • SimpleTetrisGame
    说明:  俄罗斯方块 一道简易的俄罗斯方块的制作 附源代码(Tetris Tetris together simple source code for the production of by-laws)
    2008-11-29 20:14:20下载
    积分:1
  • 中国象棋源码
    运用vc开发的界面象棋游戏,主要运用基本的vc 函数编写.可帮助vc朋友运用算法及函数调用,进一步理解vc的机理.(use vc development of the interface chess games, primarily using basic function vc prepared. Friends can help vc used algorithm and function call, vc further understand the mechanism.)
    2005-05-24 14:11:28下载
    积分:1
  • vc五子棋网络版本1.0
    网络五子棋系统,用vc实现.学习vc对话框编程,网络编程。(331 network system, using vc achieve. Learning vc dialog programming, network programming.)
    2005-06-16 12:03:04下载
    积分:1
  • suoermario
    用c语言编写的超级玛丽源程序,非常具有探讨意义(Using c language source code Super Queen Mary, explore the very meaning of)
    2008-03-29 12:44:30下载
    积分:1
  • TanChiShe
    贪吃蛇经典小游戏,有效的帮助初学者进行开发学习,起到借鉴的作用!!!(Snake classic game, effective to help beginners to develop learning, play a reference role)
    2016-03-20 11:08:34下载
    积分:1
  • hrd
    华容道游戏,大家一定都玩过,这个介绍源代码可以提高您的c#的能力(Huarong game, we must have played this introductory source code can improve your c#)
    2012-08-24 23:42:59下载
    积分:1
  • STUPID.C
    This is a game about guessing stupid problem relate to AI with some tricks in C programming.
    2015-12-15 12:05:35下载
    积分:1
  • Visual_C++GameDevelop
    Visual C++游戏开发技术与实例一书配套光盘。包含了冒险屠宰场、入侵者、赛车、网络五子棋、网络台球、对战坦克大战和面包圈7个游戏实例的完整源代码。(Visual C++ Game development technology and examples of a book supporting CD-ROM. Contains adventure slaughterhouse, the invaders, car, network Gobang, network billiards, donut war Tankedaizhan and seven examples of a complete game source code.)
    2020-06-26 03:40:02下载
    积分:1
  • cHitChecker_src
    说明:  游戏的算法 碰撞检测 开发环境是VC 库DIRECTX8.1(games collision detection algorithm development environment for VC DIRECTX8.1)
    2006-02-14 18:13:35下载
    积分: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
  • 696518资源总数
  • 105205会员总数
  • 10今日下载