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

不行呀输出不了请大神帮忙看看

public class HelloWorld{
    public static void main(String[] args) {
     int one = 10 ;
        int two = 20 ;
        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);
        }
}
      

提问者:小熊要加油 2019-09-23 20:48

个回答

  • qq吡吡吡吡吡吡哔
    2019-09-24 16:26:52
    已采纳

    慕课的提交代码有时候会有点问题,eclipse能输出就证明可以

  • qq吡吡吡吡吡吡哔
    2019-09-23 21:21:53

    three = one + two ==> 30

    three += one ==> 40

    three -= one ==> 30

    three *= one ==> 300

    three /= one ==> 30

    three %= one ==> 0


    Process completed.