为什么输出结果和题目中的不一样。大神帮我看看呀!
public class jingjing {
public static void main(String[] ages) {
int one=10;
int two=20;
int three=0;
int QQ=three=one+two; //20+10=30
int WW=three+one; //30+10=40
int EE=three-=one; //40-10=30 注释部分是自己口算结果
int RR=three*=one; //30*10=300
int TT=three/=one; //300/10=30
int YY=three%=one; //30%10=0
System.out.println("three=one+two==>"+QQ);
System.out.println("three+=one==>"+WW);
System.out.println("three-=one==>"+EE);
System.out.println("three*=one=>"+RR);
System.out.println("three/=one==>"+TT);
System.out.println("three%=one=>"+YY);
}
}
输出结果如下;
three=one+two==>30
three+=one==>40
three-=one==>20
three*=one=>200
three/=one==>20
three%=one=>0