Câu trả lời:
Program tangdan;
Uses crt;
Var n,i,j,k,t:interger;
A: array[1..100] of longint;
Begin
Clrscr;
Write('Nhap do dai day: '); readln(n);
For i:= 1 to n do
Begin
Write('A[',i,']= ');
Readln(A[i]);
End;
For i:=1 to n-1 do
For j:=i+1 to n do
If A[i]>A[j] then
Begin
t:=A[i];
A[i]:=A[j];
A[j]:=t;
End;
Write('Day sau khi duoc sap xep theo thu tu tang dan la: ',A[i]:3);
End.