for (int i = 1, j = 1; j <= 9; i++) { system.err.print(i + "*" + j + "=" + i * j + " "); if (i == j) { i = 0; j++; system.err.println(); } }
for(int i=1;i<10;i++){
for(j=1;j System.out.print(j+"*"+i+"="+i*j+" ");
}
System.out.println();
}
//九九乘法表
for (int i = 1; i < 10; i++) {
for (int j = 1; j <= i; j++) {
System.out.print(i * j + " ");
}
System.out.println();
}
就是java实现九九乘法表啊!效果如下: * 1 2 3 4 5 6 7 8 9 1 1package ch02; public class TEST{ public static void main(String[] args