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

不知道哪里出错了 中间要加空格键吗

  int three = 0;

        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);

        


提问者:慕学习者666 2018-05-20 20:09

个回答

  • 心揚
    2018-05-20 21:00:31
    已采纳

    你的加号有问题,可能是你的输入法不对,要更换成英文的加号,我刚刚更改之后运行正常。


  • 慕勒8106004
    2018-05-24 15:34:05

     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);

  • 慕学习者666
    2018-05-20 22:01:19

    修改了符号,怎么还运行不了

  • 慕用7075395
    2018-05-20 21:14:56

    输出时,字符串拼接变量名时的+号是中文的所以报错,你的所有的输出的+号都是中文的+