实验2-2-7 整数四则运算

package com.company;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
    // write your code here
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        System.out.println(A+" + "+B+" = "+(A+B));
        System.out.println(A+" - "+B+" = "+(A-B));
        System.out.println(A+" * "+B+" = "+(A*B));
        System.out.println(A+" / "+B+" = "+(A/B));
    }
}

 

posted @ 2018-09-19 09:12  博客园机器人  阅读(484)  评论(0编辑  收藏  举报