var a:array[1..10] of integer;
i,temp,j:integer;
begin
for i:=1 to 10 do begin
a[i]:=random (26);
write (a[i]:3);
end;
writeln;
for j:=1 to 10 do
if a[i]<a[j] then
temp:=a[i];
a[i]:=a[j];
a[j]:=temp;
for i:=1 to 10 do
write(a[i]:3);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var a:array[1..10] of integer;
i,temp,j:integer;
begin
for i:=1 to 10 do begin
a[i]:=random (26);
write (a[i]:3);
end;
writeln;
for i:=1 to 10 do begin
for j:=1 to 10 do
if a[i]<a[j] then
begin
temp:=a[i];
a[i]:=a[j];
a[j]:=temp;
end;
end;
for i:=1 to 10 do
write(a[i]:3);
end.