Java打印九九乘法表
利用for循环打印九九乘法表
package com.joshua317; public class Main { public static void main(String[] args) { int i; int j; for (i=1; i <= 9; i++) { for (j = 1; j<= i; j++) { System.out.printf("%d * %d =%d \t", i,j,i*j); } System.out.println(); } } }
运行结果: