006-002-013

Nested For Loops (Multiplication Table)

Medium

Problem Description

Nested For Loops (Multiplication Table)

In this problem, you will create a program that uses nested for loops to control rows (1–3) and columns (1–3), computes the product of each pair, and displays a 3×3 multiplication table with values separated by spaces to standard output.

Learning Objective: Understand 2D repetitive processing with nested for loops

Overview

Placing a for loop inside another enables row-column 2D processing. A multiplication table is a classic example.

Specifications

  • Outer for controls rows (1–3), inner for controls columns (1–3)
  • Display calculation results for each row separated by spaces

Output Format

1 2 3
2 4 6
3 6 9

Ready to Try Running Code?

Log in to access the code editor and execute your solutions for this problem.

Don't have an account?

Sign Up