每日一练ACM

2019.04.15

第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

扫描二维码关注公众号,回复: 5893369 查看本文章

猜你喜欢

转载自www.cnblogs.com/SGRBOY/p/10708912.html