文件名称:Guess Number 猜数字游戏JAVA源代码
-
所属分类:
- 标签属性:
- 上传时间:2012-09-01
-
文件大小:1kb
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
猜数字游戏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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.