import java.util.Scanner;

 public class Solution
 {
     public static void main(String[] args)
     {
         int n1 = (int)(Math.random() * 10);
         int n2 = (int)(Math.random() * 10);
         int n3 = (int)(Math.random() * 10);

         Scanner input = new Scanner(System.in);
         System.out.print(n1 + " + " + n2 + " + " + n3 + " = ? ");
         int sum = input.nextInt();

         input.close();

         if(sum == n1 + n2 + n3)
             System.out.println("True");
         else
             System.out.println("False");
     }
 }

HW3.5的更多相关文章

  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. 【Error listenerStart】 Error listenerStart Context [] startup failed due to previous errors

    发给 报错信息 八月 12, 2015 11:58:19 上午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandle ...

  2. ZOJ 3471 压缩状态DP

    这个问题要看状态怎么想,第一种直接的想法是1代表未合并,状态就从1111111 转移到 带有1个0,然后带有两个0, 但是这样子编程非常不直观.换一种思路,0代表未合并,但是我可以先合并前几个,就是说 ...

  3. CODEVS 3657 括号序列

    [问题描述] 我们用以下规则定义一个合法的括号序列: (1)空序列是合法的 (2)假如S是一个合法的序列,则 (S) 和[S]都是合法的 (3)假如A 和 B 都是合法的,那么AB和BA也是合法的 例 ...

  4. HTML5下通过response header解决跨域AJAX cookie的问题

    ajax: 通过给Response Header添加Access-Control-Allow-Origin:*  来解决跨域请求,*代表允许所有的跨域请求,或者把*换成指定的域名 cookie: 服务 ...

  5. 1006: [HNOI2008]神奇的国度

    图上的最小的染色方案: 学习了陈丹绮的论文: MCS算法 #include<cstdio> #define maxn 10005 #define maxm 2000005 using na ...

  6. WP8教程

    http://www.maiziedu.com/courses-list?technology_category=6

  7. 来看看Meteor的功能

    看了一上午,感觉这确实比所谓传统的APP开发,有很多不一样的地方. 记录下来: simple-todos.css /* CSS declarations go here */ /* CSS decla ...

  8. 转发:maven打包时始终出现以下提示:-source 1.3 中不支持泛型(请使用 -source 5 或更高版本以启用泛型)

    maven打包时始终出现以下提示: 1.-source 1.3 中不支持泛型(请使用 -source 5 或更高版本以启用泛型)List<User> userList= new Array ...

  9. Qt中QString,int,char,QByteArray之间相互转换

    http://blog.csdn.net/ymc0329/article/details/7284514 int  转 QString int m=1; QString b; b=QString::n ...

  10. Excel Cannot Connect to SharePoint List

    As I am working in SharePoint support, I come across so many issues on day 2 day basis and always tr ...