uses crt;
(*Data una serie di 20numeri interi, sistemarli in ordine crescente*)
var A : array [1..20] of integer;
I,J,X:integer;
controllo:boolean;
begin
clrscr;
writeln (' ');
for I:=1 to 20 do
begin
write ('Introdurre il numero intero N',I,'=');
readln (A);
end;
repeat
controllo:=false;
for J:=1 to 19 do
if A[J]>A[J+1] then
begin
X:=A[J+1];
A[J+1]:=A[J];
A[J]:=X;
controllo:=true;
end;
until controllo=FALSE;
writeln (' ');
writeln ('L"elenco dei 20 numeri in ordine crescente Š=');
for I:=1 to 20 do
write (A,' ');
readln
end.
