为什么输出结果和上面不同?还有我这样子编可以吗?
package com.love;
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