为什么算出来的答案与他给的答案不一样···本来按他的答案是理解的,但在eclipse算的答案现在又不懂了
eclipse 答案是30/50/30/3000/30/0
你肯定是最后输出的;
这样输
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+=0ne==>"+three);
three-=one;
System.out.println("three-=one==>"+three);
three*=one;
System.out.println("three*=ono==>"+three);
three/=one;
System.out.println("three/=ono==>"+three);
three%=one;
System.out.println("three%=ono==>"+three);
建议把代码都贴出来,你只给个结果怎么可能知道是哪里错了。
细节吧。。