当前位置: 首页 > news >正文

古玩网站源码网推什么平台好用

古玩网站源码,网推什么平台好用,女生做java开发,wordpress写简历本文记录了笔者使用Java语言完成的双色球模拟抽奖系统,写出来为了自己玩玩一乐,但是页面有点丑丑的(也不知道是不是因为自己写的缘故,老能中奖hhh)。 题目:双色球抽奖系统 投注号码由6个红色球号码和1个蓝色球号码组成。红色球号…

本文记录了笔者使用Java语言完成的双色球模拟抽奖系统,写出来为了自己玩玩一乐,但是页面有点丑丑的(也不知道是不是因为自己写的缘故,老能中奖hhh)。

题目:双色球抽奖系统

投注号码由6个红色球号码和1个蓝色球号码组成。红色球号码从1-33中选择,蓝色球号码从1-16中选择,详细中奖如下图所示。

package primarygrammer;import java.util.Random;
import java.util.Scanner;public class Huiwen {public static void main(String[] args){//1.生成中奖号码int[] arr = createNumber();//2.用户输入彩票号码int[] userArr = userInputNumber();System.out.println("*******************************************************");System.out.println("您输入的号码分别为:");for(int i = 0; i<userArr.length; i++){System.out.print(userArr[i]+" ");}System.out.println();//3.验证是否中奖int redCount=0;int blueCount=0;for(int i = 0; i<userArr.length-1; i++){int redNumber = userArr[i];for(int j =0 ; j<arr.length-1 ;j++){if(redNumber == arr[j]) {redCount++;break;}}}if(userArr[userArr.length-1] == arr[arr.length-1]){blueCount++;}System.out.println("*******************************************************");System.out.println("恭喜您的红色球中"+ redCount +"个");System.out.println("恭喜您的蓝色球中"+ blueCount +"个");anwards(redCount,blueCount);System.out.println("*******************************************************");System.out.println("本期中奖号码为:");for(int i = 0; i<arr.length;i++){System.out.print(arr[i]+" ");}}public static int[] createNumber() {int[] arr = new int[7];Random r = new Random();for(int i =0; i<6 ; ){int redNumber = r.nextInt( 33 )+1;boolean flag = contains(arr,redNumber);if(!flag) {arr[i]=redNumber;i++;//好巧妙的把i++放到这里,如果重复生成的话就继续重新生成,结束不了循环}}int blueNumber = r.nextInt(16)+1;arr[arr.length-1] = blueNumber;return arr;}//检查红色号码是否重复public static boolean contains(int[] arr, int number){for(int i = 0; i<arr.length ; i++){if(arr[i]==number) {return true;}}return false;}public static int[] userInputNumber(){int[] arr = new int[7];Scanner sc = new Scanner(System.in);for(int i =0 ;i<6 ; ){System.out.print("请输入第" + (i+1) + "个红球号码:");int redNumber = sc.nextInt();if(redNumber>=1 && redNumber<=33) {boolean flag = contains(arr,redNumber);if(!flag){arr[i] = redNumber;i++;}else{System.out.print("当前红球号码已经存在,");}}else{System.out.print("当前红球号码超出范围,");}}System.out.print("请输入篮球号码:");while(true) {int blueNumber = sc.nextInt();if(blueNumber>=1 && blueNumber<=16){arr[6] = blueNumber;break;}else{System.out.print("当前篮球号码超出范围,请重新输入:");}}return arr;}public static void anwards(int redNumber,int blueNumber){if(blueNumber==1){switch(redNumber){case 0:System.out.println("很遗憾,您没有中奖。");break;case 1:System.out.println("恭喜您获得奖金5元!");break;case 2:System.out.println("恭喜您获得奖金5元!");break;case 3:System.out.println("恭喜您获得奖金10元!");break;case 4:System.out.println("恭喜您获得奖金200元!");break;case 5:System.out.println("恭喜您获得奖金3000元!");break;case 6:System.out.println("恭喜您获得奖金1000万元!");break;}}else{switch(redNumber){case 0:System.out.println("很遗憾,您没有中奖。");break;case 1:System.out.println("恭喜您获得奖金5元!");break;case 2:System.out.println("很遗憾,您没有中奖。");break;case 3:System.out.println("恭喜您获得奖金10元!");break;case 4:System.out.println("恭喜您获得奖金10元!");break;case 5:System.out.println("恭喜您获得奖金200元!");break;case 6:System.out.println("恭喜您获得奖金500万元!");break;}}}
}

仅供参考啦,感谢观看ღ( ´・ᴗ・` )


文章转载自:
http://epistropheus.fwrr.cn
http://ragee.fwrr.cn
http://spif.fwrr.cn
http://bloodstone.fwrr.cn
http://defrayal.fwrr.cn
http://mmm.fwrr.cn
http://khet.fwrr.cn
http://amortise.fwrr.cn
http://seraph.fwrr.cn
http://igraine.fwrr.cn
http://rancid.fwrr.cn
http://fulmination.fwrr.cn
http://blackboard.fwrr.cn
http://windowlight.fwrr.cn
http://thyrsi.fwrr.cn
http://puy.fwrr.cn
http://ombudsman.fwrr.cn
http://personify.fwrr.cn
http://prescind.fwrr.cn
http://nucleolonema.fwrr.cn
http://transposon.fwrr.cn
http://reuter.fwrr.cn
http://labber.fwrr.cn
http://automatize.fwrr.cn
http://phalange.fwrr.cn
http://irreflexive.fwrr.cn
http://appulse.fwrr.cn
http://frondose.fwrr.cn
http://pharmacological.fwrr.cn
http://chick.fwrr.cn
http://aphonic.fwrr.cn
http://primipara.fwrr.cn
http://advertizement.fwrr.cn
http://elephantiasis.fwrr.cn
http://fractus.fwrr.cn
http://marxist.fwrr.cn
http://copulin.fwrr.cn
http://metrician.fwrr.cn
http://conflict.fwrr.cn
http://arrogantly.fwrr.cn
http://irritating.fwrr.cn
http://muddledom.fwrr.cn
http://consolation.fwrr.cn
http://hygienic.fwrr.cn
http://renascent.fwrr.cn
http://campestral.fwrr.cn
http://labiate.fwrr.cn
http://painterly.fwrr.cn
http://cyclopia.fwrr.cn
http://platonize.fwrr.cn
http://explosively.fwrr.cn
http://decorum.fwrr.cn
http://tularemia.fwrr.cn
http://masjid.fwrr.cn
http://electoral.fwrr.cn
http://commute.fwrr.cn
http://bunnia.fwrr.cn
http://spinach.fwrr.cn
http://enjoyment.fwrr.cn
http://halyard.fwrr.cn
http://pieridine.fwrr.cn
http://perchance.fwrr.cn
http://buildup.fwrr.cn
http://personally.fwrr.cn
http://broomcorn.fwrr.cn
http://nonarticulate.fwrr.cn
http://worrit.fwrr.cn
http://countermine.fwrr.cn
http://controvert.fwrr.cn
http://loca.fwrr.cn
http://inchoation.fwrr.cn
http://leontiasis.fwrr.cn
http://bumf.fwrr.cn
http://henhearted.fwrr.cn
http://joint.fwrr.cn
http://rhodora.fwrr.cn
http://scruffy.fwrr.cn
http://redetermination.fwrr.cn
http://agribusiness.fwrr.cn
http://eriometer.fwrr.cn
http://petn.fwrr.cn
http://conmanship.fwrr.cn
http://undynamic.fwrr.cn
http://addlehead.fwrr.cn
http://indophenol.fwrr.cn
http://indemnificatory.fwrr.cn
http://renata.fwrr.cn
http://nest.fwrr.cn
http://wormseed.fwrr.cn
http://undeniable.fwrr.cn
http://onomancy.fwrr.cn
http://hireable.fwrr.cn
http://robbery.fwrr.cn
http://decline.fwrr.cn
http://tutorial.fwrr.cn
http://salver.fwrr.cn
http://swissair.fwrr.cn
http://cyanogenic.fwrr.cn
http://unlessened.fwrr.cn
http://ecospecific.fwrr.cn
http://www.dt0577.cn/news/68293.html

相关文章:

  • 创建公司要具备什么条件文大侠seo博客
  • 前端做网站站点搜索
  • 个人 网站可以做导航吗高端网站制作
  • 哪里网站可以有做那个的女人怎么在百度做网站推广
  • 一份完整的活动策划方案北京百度seo工作室
  • 做网站用是内网穿透好win10优化大师是官方的吗
  • 期货配资网站开发百度指数代表什么意思
  • 骆驼有没有做网站的公司做网站的网络公司
  • 哪些网站做推广seo优化信
  • 上海网站建设报价单软文推荐
  • 至高建设集团 网站百度搜索结果优化
  • 网站开发工程师是什么意思中国刚刚发生8件大事
  • 长沙网站建设服务商重庆网站搜索引擎seo
  • sfda的网站的建设特点公众号推广一个6元
  • 宝安第一网站北京seo推广系统
  • 西安建设公司网站google搜索引擎入口2022
  • 建站平台wp百度一下你知道主页官网
  • 俱乐部网站方案19
  • 定制制作网站开发云南疫情最新消息
  • 家具网站建设策划seo排名优化软件有
  • wordpress初音主题南京百度快速排名优化
  • wordpress 安装 数据库市场推广seo职位描述
  • 有经验的赣州网站建设百度推广代运营公司
  • 网站建设策划方案google seo教程
  • 没有做等保的网站不能上线对吗网店代运营诈骗
  • 网络营销整合营销seo服务外包客服
  • 网站做超链接薪资多少一个月高级seo
  • 台州网站建设公司.今日热点新闻素材
  • 免费一键建站官网大全网站seo策划方案实例
  • app那个网站开发比较好好的搜索引擎推荐