文件名称:GuessNumber
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- a***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
猜数字游戏1. 随机生成4个0到9的整数,组成一个序列(使用LinkedList<Integer>存储)例如:3 6 4 4System.out.println((int)(Math.random(0*4)))2. 然后要求用户循环猜这4个数子,在用户每猜一次之后,提示用户有几个数字的位置正确了。
例如:用户输入3 7 2 4 (3和4的位置正确了),则提示用户有2个数字正确。3. 使用LinkedList存储用户每次猜测是数字组合。用户可以随时查看之前自己的输入
例如:3 7 2 4
5 7 2 4
……4. 用户猜到第10次时,就没有机会,提示猜测失败。
-Guessing game a randomly generated four integers from 0 to 9 to form a sequence (using the LinkedList <Integer> Storage) such as: 3 6 4 4System.out.println ((int) (Math.random (0* 4))) 2. And then require the user to guess the four the number of sub-cycle, once the user after each guess, prompts the user to have several digit position correct. For example: user input 3724 (3 and 4 in the correct position a), then prompts the user to have two numbers are correct. 3 using LinkedList stores each time a user to guess a digital portfolio. Before users can view their input example: 37,245,724 ... ... 4. When the user guessed the 10th, there is no chance, prompted speculation failed.
例如:用户输入3 7 2 4 (3和4的位置正确了),则提示用户有2个数字正确。3. 使用LinkedList存储用户每次猜测是数字组合。用户可以随时查看之前自己的输入
例如:3 7 2 4
5 7 2 4
……4. 用户猜到第10次时,就没有机会,提示猜测失败。
-Guessing game a randomly generated four integers from 0 to 9 to form a sequence (using the LinkedList <Integer> Storage) such as: 3 6 4 4System.out.println ((int) (Math.random (0* 4))) 2. And then require the user to guess the four the number of sub-cycle, once the user after each guess, prompts the user to have several digit position correct. For example: user input 3724 (3 and 4 in the correct position a), then prompts the user to have two numbers are correct. 3 using LinkedList stores each time a user to guess a digital portfolio. Before users can view their input example: 37,245,724 ... ... 4. When the user guessed the 10th, there is no chance, prompted speculation failed.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
11.11.2猜数字.java