07-25-2023, 09:44 AM
program BasicAlgorithmsExample;
const
SIZE = 5;
var
numbers: array[0..SIZE - 1] of Integer;
i: Integer;
begin
// Populate the array with values
for i := 0 to SIZE - 1 do
numbers[i] := i + 1;
// Output the array elements
for i := 0 to SIZE - 1 do
WriteLn('Number ', i + 1, ': ', numbers[i]);
end.
const
SIZE = 5;
var
numbers: array[0..SIZE - 1] of Integer;
i: Integer;
begin
// Populate the array with values
for i := 0 to SIZE - 1 do
numbers[i] := i + 1;
// Output the array elements
for i := 0 to SIZE - 1 do
WriteLn('Number ', i + 1, ': ', numbers[i]);
end.
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos