public class MultiplicationTable {
public static void main(String[] args) {
for (int i = 1; i <= 9; i ++) {
for (int j = 1; j <= i; j ++) {
// 注意这里是print
System.out.print(j + "*" + i + "=" + j * i + "\t");
}
System.out.println();
}
}
}
print
不换行输出
println
换行输出