Answers for "Write a program that prints a multiplication table for numbers up to 12."

3

Write a program that prints a multiplication table for numbers up to 12.

public class Main {
  public static void main(String[] args) {
    for (int y = 1; y <= 12; ++y) {
      for (int x = 1; x <= 12; ++x) {
        System.out.printf("%4d", y*x);
      }
      System.out.println();
    }
  }
}
Posted by: Guest on January-25-2021

Code answers related to "Write a program that prints a multiplication table for numbers up to 12."

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language