猿问

最后的那个是怎么得出来的?

three = one+ two ==>30

three += one ==>40

three -= one ==>30

three *= one ==>300

three /= one ==>30

three %= one ==>0


倾唱G尐調
浏览 1121回答 3
3回答

泽济天下

%是取余 能整除就是0咯

倾唱G尐調

还是不明白,我把值代入 30%10=3 呀!

Perona

前面是字符串,后面是变量值参考代码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);         } }
随时随地看视频慕课网APP

相关分类

Java
我要回答