用java打印一个九九乘法表
时间: 2023-04-12 13:00:32 浏览: 59
Java语言打印九九乘法表
Sure, here's the Java code to print a multiplication table:
```
public class MultiplicationTable {
public static void main(String[] args) {
int n = 9;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= i; j++) {
System.out.print(j + " x " + i + " = " + (i*j) + "\t");
}
System.out.println();
}
}
}
```
This will print out the multiplication table from 1x1 to 9x9.
阅读全文