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

求3-3编程题答案,我卡在这里了....求前辈帮帮忙

59c27c580001cb6d03600640.jpg求答案

提问者:用一年半时间做准备 2017-09-20 22:34

个回答

  • 阳阳丶Sheep
    2017-09-20 22:48:40
    已采纳

    public class HelloWorld{

        public static void main(String[] args) {

        int one = 10 ;

            int two = 20 ;

            int three = 0 ;

            System.out.println("three = one + two ==> " + (three = one + two));

            System.out.println("three += one ==> " + (three += one));

            System.out.println("three -= one ==> " + (three -= one));

            System.out.println("three *= one ==> " + (three *= one));

            System.out.println("three /= one ==> " + (three /= one));

            System.out.println("three %= one ==> " + (three %= one));

    }

    }

    看了一下,就是运算符以及结果的运用,供你参考