import java.util.Scanner;
public class AdditionQuiz {
public static void main(String[] args){
int number1 = (int)(System.currentTimeMillis()%10);
int number2 = (int)(System.currentTimeMillis()/10%10);
int number3 = (int)(System.currentTimeMillis()/100%10);
Scanner input = new Scanner(System.in);
System.out.println("What is " + number1 + " + " + number2 + " + " + number3 + "?");
int answer = input.nextInt();
System.out.println(number1 + " + " + number2 + " + " + number3 + " = " + answer + " is " + (number1+number2+number3 == answer));
}
}

Exercise03_02的更多相关文章

随机推荐

  1. HTML5学习之新增标签

    转自:http://www.cnblogs.com/fly_dragon/archive/2012/05/25/2516142.html 作者:FlyDragon 一.引言 在本节中,笔者将向大家讲述 ...

  2. 'express' 不是内部或外部命令,也不是可运行的程序 或批处理文件。

    新安装了express,但是当查看版本号输入: express -v 时出现如下错误: 网上查找了相关资料才发现express查看版本 的命令是 express -V (即V大写) 再次尝试: 发现同 ...

  3. c++ 批量初始化数组 fill和fill_n函数的应用

    转自c++ 如何批量初始化数组 fill和fill_n函数的应用 std::fill(a+,a+,0x3f3f3f3f);///从下标2到下标10 前闭后开 共8个 std::fill_n(a+,,0 ...

  4. float/文档流

    float : left | right | none | inherit; 文档流是文档中可显示对象在排列时所占用的位置. 浮动的定义: 使元素脱离文档流,按照指定方向发生移动,遇到父级边界或者相邻 ...

  5. Nexus 5 Change FireFox OS to android

    1.Enter Fastboot mode,flash recovery: D:\BaiduYunDownload\recovery>fastboot flash recovery 6.0.4. ...

  6. 【FIRST USE】第一次用git把代码上传到github

    第一次使用某个东西总是充满了伤痛,我第一次用sed的时候,毁掉了我的所有源代码,第一次用git的时候一直提示不正确,后来解决了问题,便记录下来. 首先说明我的环境,我用的是虚拟机,上面运行的64位的c ...

  7. OpenWRT介绍

    1. 介绍 OpenWRT是一款第三方路由器固件, 其特别在于开放性, 如它的文件系统可写, 用户可在路由器上安装需要的第三方软件.通过刷入OpenWRT, 我们可以完成如下事情 - DLNA共享 - ...

  8. 算法题之Leetcode分糖果

    题目: There are N children standing in a line. Each child is assigned a rating value. You are giving c ...

  9. 使用pipeline管道执行redis命令

    pipeline管道可以减少后端与redis的连接次数,从而实现了优化. 原理如下: 使用方法: 未使用pipeline前: strict_redis = get_redis_connection(' ...

  10. 《Java编程思想》笔记 第二十章 注解

    1.注解 注解也称元数据,是在代码中添加信息的一种方式添加的信息提供给编译器或者工具类框架使用. SE5引入,可以提供用来完整描述程序所需要的信息,往往这些信息是无法用Java来表达的. 注解可以在编 ...