Skip to content

Multiplication table

Pascal nested for loops

Flowchart (ISO 5807)

StartInput ni = 1, n, 1j = 1, n, 1Output ijwritelnEndFigure 1 — MultTable

Source code

Pascal
procedure MultTable(n: integer);
var i, j: integer;
begin
  for i := 1 to n do
  begin
    for j := 1 to n do
      write(i * j, ' ');
    writeln;
  end;
end;

The editor opens with this code — change it and the chart redraws.

Language
Pascal
Constructs
nested for loops
Topic
Loops
Formats
Word, Visio, draw.io, PDF, SVG

Related examples