1 /* 2 * 输出9*9乘法表 3 */ 4 public class Prog16 { 5 public static void main(String[] args) { 6 print(); 7 } 8 9 public static void print() { 10 for (int i = 0; i < 10; i++) { 11 for (int j = 0; j < i; j++) { 12 System.out.print(i + "*" + j + "=" + i * j + "\t"); 13 } 14 System.out.println(); 15 } 16 } 17 }
运行结果:
时间: 2024-11-06 07:41:42