program TwoDimensionalArray;
constROWS = 5;COLS = 10;
vararr: array[1..ROWS, 1..COLS] of Integer;i, j: Integer;
beginRandomize;
// Fill the array with random numbersfor i := 1 to ROWS dobeginfor j := 1 to COLS dobeginarr[i, j] := Random(100);end;end;
// Display the arrayfor i := 1 to ROWS dobeginfor j := 1 to COLS dobeginWrite(arr[i, j]:5);end;Writeln;end;
end.
program TwoDimensionalArray;
const
ROWS = 5;
COLS = 10;
var
arr: array[1..ROWS, 1..COLS] of Integer;
i, j: Integer;
begin
Randomize;
// Fill the array with random numbers
for i := 1 to ROWS do
begin
for j := 1 to COLS do
begin
arr[i, j] := Random(100);
end;
end;
// Display the array
for i := 1 to ROWS do
begin
for j := 1 to COLS do
begin
Write(arr[i, j]:5);
end;
Writeln;
end;
end.