java编程九九成法表

2024-12-15 22:36:34
推荐回答(4个)
回答1:

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

回答2:

for(int i=1;i<10;i++){
for(j=1;j System.out.print(j+"*"+i+"="+i*j+" ");
}
System.out.println();
}

回答3:

//九九乘法表
for (int i = 1; i < 10; i++) {
for (int j = 1; j <= i; j++) {

System.out.print(i * j + " ");

}
System.out.println();
}

回答4:

就是java实现九九乘法表啊!效果如下: * 1 2 3 4 5 6 7 8 9 1 1package ch02; public class TEST{ public static void main(String[] args