2019.04.15

 

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

第1000题:A+B Problem 

Problem Description
Calculate A + B.

Input
Each line will contain two integers A and B. Process to end of file.
Output
For each case, output A + B in one line.
Sample Input
1 1
Sample Output
2

 

解:

package Acm;

import java.util.Scanner;

public class Test2 {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner input=new Scanner(System.in);
        
        while(input.hasNext()){
            int a=input.nextInt();
            int b=input.nextInt();
            System.out.println(a+b);
        }
    }

}

 

 

推荐 网站: 

https://wenku.baidu.com/view/60331eae02d276a200292e2a.html

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄