import java.util.Scanner;

 public class Solution
 {
     public static void main(String[] args)
     {
         Scanner input = new Scanner(System.in);

         int number1 = (int)(Math.random() * 100);
         int number2 = (int)(Math.random() * 100);

         System.out.print(number1 + " + " + number2 + " = ? ");
         int sum = input.nextInt();

         input.close();

         if(sum == number1 + number2)
             System.out.println("True");
         else
             System.out.println("False");
     }
 }

HW3.4的更多相关文章

  1. HW3 纠结的心得

    改好的controller //yuec2 Yue Cheng package hw3; import java.io.File; import java.text.DecimalFormat; im ...

  2. 基于卷积神经网络的面部表情识别(Pytorch实现)----台大李宏毅机器学习作业3(HW3)

    一.项目说明 给定数据集train.csv,要求使用卷积神经网络CNN,根据每个样本的面部图片判断出其表情.在本项目中,表情共分7类,分别为:(0)生气,(1)厌恶,(2)恐惧,(3)高兴,(4)难过 ...

  3. Software Testing hw3

    (a):可绘制出如下图所示的流程图 (b):对于测试用例t1=(n=3)和t2=(n=5),MAXPRIMES = 4时,t1不能检查出错误,而t2则会发生数组越界错. (c):要使测试路径不通过wh ...

  4. HW3.29

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  5. HW3.28

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  6. HW3.27

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  7. HW3.26

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  8. HW3.25

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  9. HW3.24

    public class Solution { public static void main(String[] args) { int number = (int)(Math.random() * ...

  10. HW3.23

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

随机推荐

  1. Excel导出-Epplus

    首先引入EPPlus.dll到你的项目bin文件中. Epplus引用的命名空间为 OfficeOpenXml 下面是对epplus一些用法的总结 一.创建一个空excel表格 //导出EXCEL设置 ...

  2. poj 2778 DNA Sequence ac自动机+矩阵快速幂

    链接:http://poj.org/problem?id=2778 题意:给定不超过10串,每串长度不超过10的灾难基因:问在之后给定的长度不超过2e9的基因长度中不包含灾难基因的基因有多少中? DN ...

  3. redhat 5.4 下rabbitMQ单机安装.md

    1. 系统版本 `cat /etc/redhat-release` `Red Hat Enterprise Linux Server release 5.4 (Tikanga)`   2. 下载软件包 ...

  4. 求解 s = (1*1)!+(2*2)! + (3*3)!+...+(n*n)! (C语言)

    提示:定义函数可以求阶乘,再定义函数求阶乘之和.1和0的阶乘是1,n(n > 1)的阶乘是n * (n-1) * (n - 2) * … * 1 //采用了函数嵌套调用和函数递归调用 //求解阶 ...

  5. delphi xe5 android sample 中的 SimpleList 是怎样绑定的

    C:\Users\Public\Documents\RAD Studio\12.0\Samples\FireMonkeyMobile 例子中的绑定方式如下图: 1.拖拽一个listview到界面上,然 ...

  6. css3 图标上下移动动画

    @-webkit-keyframes bird{ 0% { -moz-transform: translate(0,0); -webkit-transform: translate(0,0); -o- ...

  7. CSS3 animation的steps方式过渡

    animation默认以ease方式过渡,它会在每个关键帧之间插入补间动画,所以动画效果 是连贯性的.除了ease,linear.cubic-bezier之类的过渡函数都会为其插入补间. 但有些效果不 ...

  8. 【形式化方法:VDM++系列】1.前言

    1.前言 今天开始上课学习软件需求分析与VDM++,经过一节课的学习,我又增长了见识. 软件需求工程在软件工程中处于十分核心的地位:需求分析的好坏直接决定软件工程的成败.这一点是我之前对需求工程的理解 ...

  9. 第四章 USB库介绍

    4.1 USB库函数简介 Luminary Micro公司提供USB处理器的USB库函数,应用在Stellaris处理器上,为USB设备.USB主机.OTG开发提供USB协议框架和API函数,适用于多 ...

  10. 139. Word Break

    题目: Given a string s and a dictionary of words dict, determine if s can be segmented into a space-se ...