const Count = 3; var a : array [1..Count] of Integer; i, b, c: Integer; begin Writeln('Введите числа:'); for i := 1 to Count do begin Write(i ,': '); Readln( a[i] ); end; for i := 1 to Count do for b := 1 to Count do if a[i] < a[b] then begin c := a[i]; a[i] := a[b]; a[b] := c; end; for i := 1 to Count do Write (a[i], ' '); end.
Program Program1; var arr: array[1..3] of real; i, z, h: integer; procedure swap(var x, y: real); var t: real; begin t := x; x := y; y := t end; begin writeln('Введите три числа:'); for i := 1 to 3 do read(arr[i]); for h := 1 to 3 - 1 do for z := 1 to 3 - h do if arr[z] > arr[z + 1] then swap(arr[z], arr[z + 1]); for i := 1 to 3 do write(arr[i], ' '); end.
Count = 3;
var a : array [1..Count] of Integer;
i, b, c: Integer;
begin
Writeln('Введите числа:');
for i := 1 to Count do
begin
Write(i ,': ');
Readln( a[i] );
end;
for i := 1 to Count do
for b := 1 to Count do
if a[i] < a[b] then
begin
c := a[i];
a[i] := a[b];
a[b] := c;
end;
for i := 1 to Count do
Write (a[i], ' ');
end.
var arr: array[1..3] of real;
i, z, h: integer;
procedure swap(var x, y: real);
var t: real;
begin t := x; x := y; y := t
end;
begin
writeln('Введите три числа:');
for i := 1 to 3 do read(arr[i]);
for h := 1 to 3 - 1 do
for z := 1 to 3 - h do
if arr[z] > arr[z + 1] then
swap(arr[z], arr[z + 1]);
for i := 1 to 3 do write(arr[i], ' ');
end.