 
		慕设计9106097
2020-02-06 18:23
运算正确了 但是倒数第二个数值算成了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) 这样试试
Java入门第一季(IDEA工具)
1168084 学习 · 18754 问题
相似问题