问答详情
源自:3-3 Java中的赋值运算符

3-3练习题

怎么做

提问者:空空白白的坚持 2017-06-03 22:30

个回答

  • 乱七八糟的代码
    2017-07-07 16:39:56

    public static void main(String[] args) {
         int one = 10 ;
            int two = 20 ;
            int three = 0 ;
            int three=one+two;
            System.out.println("three=one+two==>"+three);
            int three+=one;
            System.out.println("three+=one==>"+three);
            int three-=one;
            System.out.println("three-=one==>"+three);
            int three*=one;
            System.out.println("three*=one==>"+three);
            int three/=one;
            System.out.println("three/=one==>"+three);
            int three%=one;
            System.out.println("three%=one==>"+three);
     }
    }

  • qq_呵呵_5
    2017-06-03 23:21:24

    three = one + two;

            three += one;

            three -= one;

            three *= one;

            three /= one;

            three %= one;