文件名称:2
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:7.44kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
(1)在屏幕上按如下格式输出乘法口诀表:
1X1=1
1X2=2 2X2=4
1X3=3 2X3=6 3X3=9
…
其中,每行的多个乘法公式之间用‘\t’分割
(2)编写一个简单的猜数游戏程序:
利用Math.random()方法生成0-1之间的double型数dNum,将dNum转换为0-100之间的整数iNum。
利用KeyInput.readInt()方法接收键盘输入的整数inNum。如果inNum小于iNum,在屏幕上显示“输入的值小,请输入更大的数.”;如果inNum大于iNum,在屏幕上显示“输入的值大,请输入更小的数.”;如果inNum等于iNum,在屏幕上显示“猜对了.”,并结束运行。
猜测错误的时候,重新输入inNum,直到猜对为止。如果猜测10次后仍未猜对,显示“猜测次数已达10次,猜数失败.”,并结束程序的运行。
-(1) on the screen by using the following format output multiplication rhymes table: 1X1 = 1 1X2 = 2X2 = 4 1X3 = 3 2X3 = 6 3X3 = 9 ... multiple multiplication formula between each line with ' \ t' split (2) the preparation of a simple guessing game program: Math.random () method to generate a number between 0-1 double-dNum, the dNum converted to an integer between 0-100 iNum. KeyInput.readInt () method receives the keyboard input integer inNum. If inNum less than iNum, displayed on the screen " the value of the input is small, enter the larger number." If inNum than iNum, displayed on the screen " input value, enter the smaller number." If inNum equal iNum, displayed on the screen guessed. " and the end of the run. The guesses wrong, re-enter inNum, until the guess so far. If the guess is 10 times yet guessed, " guess the number has reached 10 times to guess the number of failure." , And the end of the program run.
1X1=1
1X2=2 2X2=4
1X3=3 2X3=6 3X3=9
…
其中,每行的多个乘法公式之间用‘\t’分割
(2)编写一个简单的猜数游戏程序:
利用Math.random()方法生成0-1之间的double型数dNum,将dNum转换为0-100之间的整数iNum。
利用KeyInput.readInt()方法接收键盘输入的整数inNum。如果inNum小于iNum,在屏幕上显示“输入的值小,请输入更大的数.”;如果inNum大于iNum,在屏幕上显示“输入的值大,请输入更小的数.”;如果inNum等于iNum,在屏幕上显示“猜对了.”,并结束运行。
猜测错误的时候,重新输入inNum,直到猜对为止。如果猜测10次后仍未猜对,显示“猜测次数已达10次,猜数失败.”,并结束程序的运行。
-(1) on the screen by using the following format output multiplication rhymes table: 1X1 = 1 1X2 = 2X2 = 4 1X3 = 3 2X3 = 6 3X3 = 9 ... multiple multiplication formula between each line with ' \ t' split (2) the preparation of a simple guessing game program: Math.random () method to generate a number between 0-1 double-dNum, the dNum converted to an integer between 0-100 iNum. KeyInput.readInt () method receives the keyboard input integer inNum. If inNum less than iNum, displayed on the screen " the value of the input is small, enter the larger number." If inNum than iNum, displayed on the screen " input value, enter the smaller number." If inNum equal iNum, displayed on the screen guessed. " and the end of the run. The guesses wrong, re-enter inNum, until the guess so far. If the guess is 10 times yet guessed, " guess the number has reached 10 times to guess the number of failure." , And the end of the program run.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
实验一/.classpath
实验一/.project
实验一/bin/
实验一/bin/Guess.class
实验一/bin/HelloWorld.class
实验一/bin/HelloWorldApplet.class
实验一/bin/java.policy.applet
实验一/bin/KeyInput.class
实验一/bin/m99.class
实验一/bin/N.class
实验一/src/
实验一/src/Guess.java
实验一/src/HelloWorld.java
实验一/src/HelloWorldApplet.java
实验一/src/KeyInput.java
实验一/src/m99.java
实验一/src/N.java
实验一/.project
实验一/bin/
实验一/bin/Guess.class
实验一/bin/HelloWorld.class
实验一/bin/HelloWorldApplet.class
实验一/bin/java.policy.applet
实验一/bin/KeyInput.class
实验一/bin/m99.class
实验一/bin/N.class
实验一/src/
实验一/src/Guess.java
实验一/src/HelloWorld.java
实验一/src/HelloWorldApplet.java
实验一/src/KeyInput.java
实验一/src/m99.java
实验一/src/N.java
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.