文件名称:Lottery
-
所属分类:
- 标签属性:
- 上传时间:2015-07-21
-
文件大小:1.71kb
-
已下载: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/
Lottery/
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.