import java.util.Scanner;

 public class Lottery {
public static void main(String[] agrs) {
int lottery = (int)(Math.random() * ); Scanner input = new Scanner(System.in);
System.out.print("Enter your lottery pick (two digits): ");
int guess = input.nextInt(); int lotteryDigit1 = lottery / ;
int lotteryDigit2 = lottery % ; int guessDigit1 = guess / ;
int guessDigit2 = guess % ; System.out.println("The lottery number is " + lottery); if (guess == lottery)
System.out.println("exact match: you win $10000");
else if (guessDigit2 == lotteryDigit1
&& guessDigit1 == lotteryDigit2)
System.out.println("Math all digits: you win $3000");
else if (guessDigit1 == lotteryDigit1
|| guessDigit1 == lotteryDigit2
|| guessDigit2 == lotteryDigit1
|| guessDigit2 == lotteryDigit2)
System.out.println("Match one digit: you win $1000");
else
System.out.println("Sorry, no macth");
}
}

最新文章

  1. js继承方式
  2. CSS3两个动画顺序衔接播放
  3. 使用Microsoft.Office.Interop.Excel.Application xlApp 生成Excel
  4. ubuntu apache开启重写模块
  5. oracle将多条数据合并成一条
  6. setjmp 与 longjmp
  7. Easyui datebox控件打开页面就验证解决方法
  8. 自己做个 Tag标签
  9. 【ASP.NET MVC 学习笔记】- 13 Child Action
  10. office 32-bit components 2010 的卸载
  11. C# MemoryCache GCHandle
  12. 尚硅谷springboot学习30-docker安装mysql示例
  13. 卸载ros的方法
  14. angular file change
  15. 2018-2019-2 《网络对抗技术》Exp2 后门原理与实践 Week4 20165233
  16. C#高级编程9 第14章 内存管理和指针
  17. [driver]/lib/modules
  18. 20135320赵瀚青LINUX内核分析第四周学习笔记
  19. 2019.3.28 JDBC相关
  20. ubuntu 12.10 apt-get 源

热门文章

  1. Python---基础---常用的内置模块
  2. dubbo、web应用 项目结构以及发布目录结构
  3. [NOIP2016][luogu]换教室[DP]
  4. 网站名,服务器名,url,ip,域名的区别和联系。
  5. womenzijide_jiafenxiang
  6. P哥的桶(线段树+线性基)
  7. php.ini 配置项详解
  8. leetcode 78. 子集(c++)
  9. linux使用pigz多线程压缩
  10. layer帮助手册