2 câu trả lời
program xoaphantu;
uses crt;
var A:array[1..100] of integer;
n,i:integer;
begin
clrscr;
write('Nhap so luong phan tu cua mang: '); readln(n);
writeln('NHAP TUNG PHAN TU CUA MANG');
for i:=1 to n do
begin
write('Phan tu thu nhat ',i,': ');
readln(A[i]);
end;
n:=n-1;
for i:=1 to n do
A[i]:=A[i+1];
write('Day sau khi xoa phan tu dau la: ');
for i:=1 to n do
write(A[i],' ');
readln
end.
uses crt;
var a:array[1..100] of integer;
i,n:integer;
begin
clrscr;
write('Nhap so phan tu cua mang (n): '); readln(n);
for i:=1 to n do
begin
write('nhap a[',i,']: '); readln(a[i]);
end;
n:=n-1;
for i:=1 to n do a[i]:=a[i+1];
write ('Day sau khi xoa phan tu dau la: ');
for i:=1 to n do
write(A[i],' ');
readln
end.