how to print 2 time 1 to 12 in java code example
Example: Multiplication table for number Java
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();
}