运算正确了 但是倒数第二个数值算成了20 什么情况
public class HelloWorld{
public static void main(String[] args) {
int one = 10 ;
int two = 20 ;
int three = 0 ;
System.out.println("three = one + two ==>"+ (three=one+two));
System.out.println("three += one ==>"+ (three+=one));
System.out.println("three -= one ==>"+ (three-=one));
System.out.println("three *= one ==>"+ (three*=one));
System.out.println("three /= one ==>"+ (three/=one));
System.out.println("three %= one ==>"+ (three%=one));
}
}
这样是不是更好呢
int d=(two*=one) 这样试试