-
2.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.)
- 2010-11-03 14:29:09下载
- 积分:1
-
976556576
设置输入方法,C++Builder精选编程学习源码,很好的参考资料。(Set the input method, C++Builder select learning programming source code, a good reference.)
- 2013-11-22 11:36:28下载
- 积分:1
-
公用类 发邮件和正则表达式
公用类 发送邮件和正则表达式 字符串操作
- 2022-02-22 02:04:11下载
- 积分:1
-
160160stm32
用ARM内核的CORTEX系列M3产品STM32所做程序,用于控制UC1698进行显示控制,完整程序,直接运行。(CORTEX ARM cores with a series of M3 STM32 products made program for controlling display UC1698 control , complete program , run directly .)
- 2020-12-11 14:19:17下载
- 积分:1
-
w54
dick wempdick wempdick wempdick wemp
- 2014-08-20 09:44:26下载
- 积分:1
-
trainFilter
C++中使用fftw库,根据correlation filters的相关知识编写实现,可以是实现图片的相关滤波的功能,在一副图片中找到对应patch在图片中的位置,从而进行detection和tracking的相关改进(C++ fftw library use, according to the knowledge of the preparation to achieve correlation filters, which can be filtered so as to achieve a picture related to the correlation detection and tracking of improvements)
- 2014-12-22 09:19:37下载
- 积分:1
-
定时器1
说明: 该程序为大家提供定时器程序例程。给大家一个参考,来实现简单的定时功能(This program provides you with timer routines. Give you a reference to achieve a simple timing function)
- 2020-06-17 19:00:01下载
- 积分:1
-
vxworks_file_system
说明: vxworks下文件系统的构建,以及flash的MTD层驱动的相关资料(vxworks file system under the building, and the flash of the MTD layer-driven information)
- 2011-04-02 23:28:13下载
- 积分:1
-
CTPhf
ctp海风实例
有修改
非常好的交易实例(ctp cthostftdctraderapi)
- 2013-12-24 19:59:50下载
- 积分:1
-
51单片机控制sim900a模块发短信呢,打电话,传数据的程序
普通的51单片机程序,控制sim900a模块,可以实现发短信,打电话,传数据的基本功能
- 2022-01-26 08:15:11下载
- 积分:1