public class Multiply { public static void main (String[] args) { final int SIZE = 10; int x = 0; while (x<SIZE) { x++; int y=0; while (y<SIZE) { y++; int z = x*y; if (z<10) System.out.print(" "); if (z>=100) System.out.print(" "); System.out.print(" " +z); } System.out.println(); } }}
如果X++是先计算,再自加1,可是没有式子算啊,那么是不是直接就 =1?
y++先算z=1*0 y=1 ?
这样的话 print 是 空格+0 啊。。
为什么电脑运行出来是这个
求详细解释 ++X 与++X,
X++是如果是"a=x++;";就是先把x的值赋给a; 再X自加,反则先自加,再把自加后的值赋给a;如果就单单一个语句“X++;”的话与"++X"没区别;
可能我的回答不能让你满意但希望能让你的问题更加清晰。