我的第一个小程序:
九九乘法表:
package ch6; public class JiuJiu { public static void main(String[] args) { int i, j, k; for (i = 1; i <= 9; i++) { for (j = 1; j <= i; j++) { k = i * j; System.out.print(i + "*" + j + "=" + k +" "); } System.out.print(" " + '\n'); } } }
时间: 2024-10-23 20:04:33