登录
首页 » Visual C++ » 2.3

2.3

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

  • Poker
    用socket 编写的够击.自定义了网络传输的规约,和发牌规则.(Socket prepared with enough hit. Since the definition of the network transmission of the Statute, and licensing rules.)
    2008-04-19 15:27:21下载
    积分:1
  • dx9_texture_addressing
    介绍dx9的纹理编程技术,适合初学者,对于dx9的学习具有帮助(Introduced programming dx9 texture, suitable for beginners, for the study with help dx9)
    2009-06-28 00:23:58下载
    积分:1
  • wuziqi
    五子棋程序设计,设计方式步骤详尽解释,适合初学者,让你熟悉C语言(Backgammon program design, design approach procedure detailed explanation, suitable for beginners, so you are familiar with the C language)
    2013-08-13 10:31:30下载
    积分:1
  • gamesl
    C语言编写的仿微软系统经典游戏扫雷,源代码全是C语言写的。大家学习、观摩。(The classic game Minesweeper of the the imitation Microsoft System C language source code is written in C language. Them to learn, to observe.)
    2013-01-22 21:16:02下载
    积分:1
  • ChineseChess
    说明:  中国象棋棋盘C#实现,主要用于学习面向对象相关知识(Chinese chess board C# to achieve, mainly for learning object-oriented knowledge)
    2009-07-26 22:20:46下载
    积分:1
  • sPCK
    完美世界游戏客户端pck解包打包工具,同时支持cup更新包解包。(Perfect world game client PCK unpack packaging tools, at the same time support CPU update package. )
    2013-10-24 15:03:00下载
    积分:1
  • dds
    去年写的一款打地鼠游戏附源码,虽然不是很好玩,但是玩着玩着,就想起了小时候玩的游戏机。(Wrote a play hamster game last year, with source code, although not very fun, but playing playing, you think of a child playing game.)
    2014-05-25 20:15:41下载
    积分:1
  • 11
    说明:  一个和电脑猜拳的小游戏,适合C++初学者。(A computer game and small game, suitable for beginners C++ language. )
    2015-10-11 13:03:52下载
    积分:1
  • AdvInAbatSrc
    说明:  这是一个简单的2d图形动画,是用VC编的,适合初学者参考。(This is a simple 2d graphics animation, VC series is the reference for beginners.)
    2006-01-31 17:44:04下载
    积分:1
  • wuziqi
    c语言版五子棋,与pc版一样,拥有良好的界面(c yuyait can run on the pc)
    2016-12-28 14:26:29下载
    积分:1
  • 696516资源总数
  • 106579会员总数
  • 0今日下载