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

这应该怎么写呢

相关截图:
https://img2.mukewang.com/62199eea0001725d13863001.jpg

提问者:慕妹4200973 2022-02-26 11:30

个回答

  • 慕圣3139214
    2022-07-03 17:44:03

            int age1=three=one+two;

            int age2=three+=one;

            int age3=three-=one;

            int age4=three*=one;

            int age5=three/=one;

            int age6=three%=one;

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

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

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

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

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

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

            

  • weixin_慕神4436990
    2022-03-16 18:54:55

    int one = 10 ;

            int two = 20 ;

            int three=one+two;

            System.out.println(three);

            three+=one;

            System.out.println(three);

            three-=one;

            System.out.println(three);

            three*=one;

            System.out.println(three);

            three/=one;

            System.out.println(three);

            three%=one;

            System.out.println(three);


  • weixin_慕雪2491801
    2022-02-28 19:47:51

            three=one+two;

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

            three+=one;

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

            three-=one;

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

            three*=one;

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

            three/=one;

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

            three%=one;

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

    搜索

    复制