舵
2017-04-03 17:55
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的结果是0呢,three此时为30,30%10因该为3才对啊
%是取余,30除以10的余数是0!!!并不是3!!!!1
Java入门第一季(IDEA工具)升级版
1165172 学习 · 17581 问题
相似问题