public class MultiplicationTable {
public static void main(String[] args) {
// Loop through columns
for (int i = 1; i <= 9; i++) {
// Loop through rows
for (int j = 1; j <= 9; j++) {
// Print each product with formatted output
System.out.printf("%d★%d=%-2d ", j, i, i * j);
}
// Move to the next line after each column
System.out.println();
}
}
}