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

这哪里错了?请高人指点

int three=one+two;        int three+=one;        int three-=one;        int three*=one;                int three/one;        int three%=one;                System.out.println(three);    } }

提问者:慕雪8631886 2018-05-07 19:26

个回答

  • 慕婉清1248696
    2018-05-08 12:31:53
    已采纳

    int声明关键字,不能每句都用吧。

  • qq_时光交错_0
    2018-05-17 19:29:40

    int one = 10 ;
        int two = 20;
       int three = 0 ;
       int as=one+two;
       int sw=two+two;
       int dw=two+two-one;
       int ad=(one+two)*one;
       int asd=(ad/30)+two;
       int sc=(one+two)%(one+two);
      
      
       System.out.println("three=one+two==>"+as);
       System.out.println("three+=one==>"+sw);
       System.out.println("three-=one==>"+dw);
       System.out.println("three*=one==>"+ad);
        System.out.println("three/=one==>"+asd);
       System.out.println("three%=one==>"+sc);

  • 慕数据4503078
    2018-05-07 19:34:02

    int three+=one; 不存在多吧3怎么会等于3+1