HW3.4

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的更多相关文章
- HW3 纠结的心得
改好的controller //yuec2 Yue Cheng package hw3; import java.io.File; import java.text.DecimalFormat; im ...
- 基于卷积神经网络的面部表情识别(Pytorch实现)----台大李宏毅机器学习作业3(HW3)
一.项目说明 给定数据集train.csv,要求使用卷积神经网络CNN,根据每个样本的面部图片判断出其表情.在本项目中,表情共分7类,分别为:(0)生气,(1)厌恶,(2)恐惧,(3)高兴,(4)难过 ...
- Software Testing hw3
(a):可绘制出如下图所示的流程图 (b):对于测试用例t1=(n=3)和t2=(n=5),MAXPRIMES = 4时,t1不能检查出错误,而t2则会发生数组越界错. (c):要使测试路径不通过wh ...
- HW3.29
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW3.28
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW3.27
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW3.26
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW3.25
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW3.24
public class Solution { public static void main(String[] args) { int number = (int)(Math.random() * ...
- HW3.23
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
随机推荐
- Linux-ubuntu
在VMware安装ubuntu时磁盘分配如下: /boot 100MB / 2G swap 512MB /home 5G /var 1G /usr 5G+. 设置root权限:sudo passwd ...
- Sqlmap下载安装与基础命令使用
本文介绍一下Sqlmap的安装跟配置环境变量. 顺便附上一些常用的命令 SQLMAP-64位.Python 下载链接:http://pan.baidu.com/s/1c0D82fm 密码:d7ec P ...
- HtmlTestRunner二次封装(TestRunner.py)
将HtmlTestRunner进行二次封装,使报告生成的更方便 import HTMLTestRunner import unittest import time, os class TestRunn ...
- DB天气app冲刺第一天
今天算是正式的第一天开始着手做这个app了,前两天作的是嵌入式的大作业,看着书上的例子做了一个小游戏.基本也算完成了作业.主要是为了练手,熟悉android的开发流程.基本明白了.以后好上手了. 今天 ...
- Grails连接外部数据库注意事项Could not determine Hibernate dialect for database name [Oracle]!
初次使用Grails时,使用其内置数据库,一直不会出错,但迁移到外部数据库时会出错Could not determine Hibernate dialect for database name [Or ...
- poj 3415 Common Substrings(后缀数组+单调栈)
http://poj.org/problem?id=3415 Common Substrings Time Limit: 5000MS Memory Limit: 65536K Total Sub ...
- Burp Suite教程(英文版)
In this article, we are going to see another powerful framework that is used widely in pen-testing. ...
- MySQL JDBC的setFetchSize
MySQL JDBC的setFetchSize http://uuhorse.iteye.com/blog/2163582 http://blog.sina.com.cn/s/blog_6706203 ...
- java 对象 类 知识点 概览
第30集 面向对象,核心是对象,以对象来思考
- Type-C设计上的防护
Type C设计上各家芯片公司都提供了很多方案,但在防护方面很多留给了客户自己选择,这方面我可以重点聊聊,说起防护,无非就是过压过流防护. 过压防护,Type C的信号线有很多,都需要做静电防护,US ...