How to fill a one-dimensional array so that the digit in the array corresponds to the index.

For example:

x: array [1..7] of integer;

and that under 1 was 1, under 5 - 5, etc.

    1 answer 1

    something like

      ... for k := 1 to 7 do x[k] := k; ...