📅  最后修改于: 2022-03-11 14:52:38.811000             🧑  作者: Mango
public static String multiTable(int num) {
StringBuilder sb = new StringBuilder();
for (int i = 1; i <= 10; i++) {
int result = i * num;
sb.append(i + " * " + num + " = " + result + "\n");
}
return sb.toString().trim();
}