我是初学者,请问有谁知道下面这个是怎么输出的呢?麻烦你们啦~谢谢!

56a2e83c000165dc05000157.jpg

凡雪
浏览 1394回答 4
4回答

lanchc

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);      } }

qq_wannamoer_03517640

额int one=10;int two=20; 

慕粉3291149

one=10  two=20第一步  three = one + two = 10 + 20 = 30第二步  three +=one 意思是 three = three + one= 30 + 10 = 40第三步 three -= one 意思是 three = three - one = 40 - 10 = 30第三步 three *= one 意思是 three = three*one = 30 * 10 = 300第四步 three /= one 意思是 three = three/one = 300/30 = 10(这里/意思是除法 就是three除以one得到的商)第五步 three %= one 意思是 three = three%one = 10%10 = 0 (这里%意思是取余  就是three除以one得到的余数)

化茧成蛹

问题说清楚一点,不知道你说的问题,该怎么回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java