program XoaPhanTuAm;
vararr: array[1..100] of integer;
n, i, j: integer;
beginwrite('Nhap so phan tu: ');
readln(n);
for i := 1 to n do
begin
write('Nhap phan tu thu ', i, ': ');
readln(arr[i]);
end;
j := 0;
for i := 1 to n do
begin
if arr[i] >= 0 then
begin
j := j + 1;
arr[j] := arr[i];
end;
end;
n := j;
writeln('Mang sau khi xoa phan tu am:');
for i := 1 to n do
begin
write(arr[i], ' ');
end;
readln;
end.