package com.fs.test;

public class Test {

    public void aMethod(int a, int b) {
        int add = a + b;//*表示加法运算
        int reduce = a - b;//*表示减法运算
        int multiply = a * b;//*表示乘法运算
        int divide = a/b;// a对b整除的数    /表示除法,b不能为0
        
        System.out.println("add = " + add);
        System.out.println("reduce = " + reduce);
        System.out.println("multiply = " + multiply);
        System.out.println("divide = " + divide);
    }
    
    public static void main(String[] args) {
        Test t = new Test();
        t.aMethod(10, 3);
    }
}

 

相关文章:

  • 2022-01-27
  • 2022-01-21
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
猜你喜欢
  • 2021-08-05
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案