2018/12/08 L1-036 A乘以B Java

简单的题目, 就是考察简单的输入和乘法:

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int A = Integer.parseInt(str[0]);
        int B = Integer.parseInt(str[1]);
        int final_num = 0;
        if (Math.abs(A) <= 100 && Math.abs(B) <= 100) {
            final_num = A * B;
            System.out.print(final_num);
        } else {
            return;
        }

    }

}

 

posted @ 2018-12-08 11:45  HHZZHH  阅读(225)  评论(0编辑  收藏  举报