利用for循环打印九九乘法表
代码语言:javascript复制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();
}
}
}
运行结果:
代码语言:javascript复制