program DeleteElements;
vararr: array of Integer;n, i, k: Integer;
begin
Write('Enter the size of array: ');ReadLn(n);
SetLength(arr, n);
WriteLn('Enter elements of array:');for i := 0 to n - 1 doReadLn(arr[i]);
Write('Enter the number of elements to delete after the first element: ');ReadLn(k);
for i := 0 to k doif i + 1 < n thenarr[i + 1] := 0;
WriteLn('Resulting array:');for i := 0 to n - 1 doWriteLn(arr[i]);
end.
program DeleteElements;
var
arr: array of Integer;
n, i, k: Integer;
begin
Write('Enter the size of array: ');
ReadLn(n);
SetLength(arr, n);
WriteLn('Enter elements of array:');
for i := 0 to n - 1 do
ReadLn(arr[i]);
Write('Enter the number of elements to delete after the first element: ');
ReadLn(k);
for i := 0 to k do
if i + 1 < n then
arr[i + 1] := 0;
WriteLn('Resulting array:');
for i := 0 to n - 1 do
WriteLn(arr[i]);
end.