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. Spring - IoC(4): p-namespace & c-namespace

    p 命名空间 p 命名空间允许你使用 bean 元素的属性而不是 <property/>子元素来描述 Bean 实例的属性值.从 Spring2.0 开始,Spring 支持基于 XML ...

  2. 【poj1743-Musical Theme】不可重叠最长重复子串-后缀数组

    http://poj.org/problem?id=1743 这题是一道后缀数组的经典例题:求不可重叠最长重复子串. 题意: 有N(1 <= N <=20000)个音符的序列来表示一首乐曲 ...

  3. 【BZOJ1857】【SCOI2010】传送带 [三分]

    传送带 Time Limit: 1 Sec  Memory Limit: 64 MB[Submit][Status][Discuss] Description 在一个2维平面上有两条传送带,每一条传送 ...

  4. AtCoder Regular Contest 082 F

    Problem Statement We have a sandglass consisting of two bulbs, bulb A and bulb B. These bulbs contai ...

  5. 关于C++随机函数

    #include<iostream> #include<cstdlib> #include<ctime> using namespace std; int main ...

  6. python2.7字典转换成json时中文字符串变成unicode的问题:

    参考:http://blog.csdn.net/u014431852/article/details/53058951 编码问题: python2.7字典转换成json时中文字符串变成unicode的 ...

  7. mysql五-2:多表查询

    一 介绍 本节主题 多表连接查询 复合条件连接查询 子查询 准备表 company.employeecompany.department #建表 create table department( id ...

  8. Python3安装cx_Oracle连接oracle数据库实操总结

    弄清版本,最重要!!! 首先安装配置时,必须把握一个点,就是版本一致!包括:系统版本,python版本,oracle客户端的版本,cx_Oracle的版本,然后安装配置就容易了! 如果已经安装Pyth ...

  9. OSI和TCP/IP的对比+IP地址分类

    一.OSI和TCP/IP对比 二.IP地址分类 A类私有IP地址:10.0.0.0-10.255.255.255B类私有IP地址:172.16.0.0-172.31.255.255C类私有IP地址:1 ...

  10. 【洛谷】xht模拟赛 题解

    前言 大家期待已久并没有的题解终于来啦~ 这次的T1和HAOI2016撞题了...深表歉意...表示自己真的不知情... 天下的水题总是水得相似,神题各有各的神法.--<安娜·卡列妮娜> ...