public class HelloWorld{
public static void main(String[] args) {
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+=one==>"+three);
three-=one;
System.out.println("three-=one==>"+three);
three*=one;
System.out.println("three*=one==>"+three);
three/=one;
System.out.println("three/=one==>"=three);
three%=one;
System.out.println("three%=one==>"=three);
}
研究了半开,终于搞出来出题人的答案。
因为在你定义three的过程中,one不变,但three是一直在变的,你可以根据这些运算符算一算,就能知道了。
int one = 10 ;
int two = 20 ;
int three = 0 ;
怎么计算出现的300/40这些的数字