文件名称:Lottery
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2015-07-21
- 文件大小:
- 2kb
- 下载次数:
- 0次
- 提 供 者:
- 王*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
编写一个彩票模拟程序:
* 首先提示用户玩法:
* 玩法一:21选5
* 输入五个不同的数(从1,2,3.....21中选)
* 玩法二:6+1
* 输入七个数(代表购买彩票的号码,最后一位是特别号)
* 根据用户选择的玩法,随机生成开奖号码,与用户输入的号码比较,判断是否中奖,中几等奖,输出结果
* 21选5
* 一等奖:五个号码相同
* 二等奖:四个号码相同
* 三等奖:三个号码相同
* 6+1
* 特等奖:6+1
* 一等奖:6
* 二等奖:连续五位数相同
* 三等奖:连续四个数相同
* 四等奖:连续三个数相同-Write a lottery simulation program:* first prompts the user to play:* Play one: 21 Select 5* Enter five different numbers (21 selected 1,2,3 .....)* Play two: 6+1* Enter seven number (the number of representatives to buy lottery tickets, the last one is especially number)* Based on user-selected play, randomly generated lottery number, compared with the number entered by the user to determine whether the win, in a few prize, selected output* 21 5* First prize: the same five numbers* Second prize: four numbers the same* Third prize: the same three numbers* 6+1* Grand Prize: 6+1* First Prize: 6* Second Prize: Five consecutive same number* Third prize: four consecutive same number* Fourth Prize: the same three numbers in a row
* 首先提示用户玩法:
* 玩法一:21选5
* 输入五个不同的数(从1,2,3.....21中选)
* 玩法二:6+1
* 输入七个数(代表购买彩票的号码,最后一位是特别号)
* 根据用户选择的玩法,随机生成开奖号码,与用户输入的号码比较,判断是否中奖,中几等奖,输出结果
* 21选5
* 一等奖:五个号码相同
* 二等奖:四个号码相同
* 三等奖:三个号码相同
* 6+1
* 特等奖:6+1
* 一等奖:6
* 二等奖:连续五位数相同
* 三等奖:连续四个数相同
* 四等奖:连续三个数相同-Write a lottery simulation program:* first prompts the user to play:* Play one: 21 Select 5* Enter five different numbers (21 selected 1,2,3 .....)* Play two: 6+1* Enter seven number (the number of representatives to buy lottery tickets, the last one is especially number)* Based on user-selected play, randomly generated lottery number, compared with the number entered by the user to determine whether the win, in a few prize, selected output* 21 5* First prize: the same five numbers* Second prize: four numbers the same* Third prize: the same three numbers* 6+1* Grand Prize: 6+1* First Prize: 6* Second Prize: Five consecutive same number* Third prize: four consecutive same number* Fourth Prize: the same three numbers in a row
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Lottery\main.java
Lottery