const mmm=5;
var
x:array[1..mmm] of integer;
k, n, bmaks: integer;
begin
for n:=1 to mmm do readln (x[n]);
for n:=1 to mmm-1 do
for k:=1 to mmm-n do
bmaks:=x[k+1];
X[k+1]:=x[k];
x[k]:= bmaks;
end;
for n:=1 to mmm do
writeln(x[n]);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
const mmm=5;
var
x:array[1..mmm] of integer;
k, n, bmaks: integer;
begin
for n:=1 to mmm do readln (x[n]);
for n:=1 to mmm-1 do
for k:=1 to mmm-n do
begin
bmaks:=x[k+1];
X[k+1]:=x[k];
x[k]:= bmaks;
end;
for n:=1 to mmm do
writeln(x[n]);
end.