Программа:
Pascal:
var
arr: array of integer;
M, N, i: integer;
begin
write('N = '); readln(N);
SetLength(arr, N);
for i := 1 to N - 1 do arr[i] := random(10);
writeln(arr);
write('M = '); readln(M);
for i := M - 1 to N - 2 do
arr[i] := arr[i+1];
SetLength(arr, N - 1);
end.
Программа:
Pascal:
var
arr: array of integer;
M, N, i: integer;
begin
write('N = '); readln(N);
SetLength(arr, N);
for i := 1 to N - 1 do arr[i] := random(10);
writeln(arr);
write('M = '); readln(M);
for i := M - 1 to N - 2 do
arr[i] := arr[i+1];
SetLength(arr, N - 1);
writeln(arr);
end.