Program n1; procedure Sort(var A, B, C: integer); var t: integer; begin if A < B then begin t := B; B := A; A := t end; if A < C then begin t := C; C := A; A := t end; if B < C then begin t := C; C := B; B := t end end; var A, B, C: integer; begin writeln('Введите три числа: '); readln(A, B, C); Sort(A, B, C); writeln('Числа по убыванию: ', A, ' ', B, ' ', C) end.
Answers & Comments
Verified answer
Program n1;procedure Sort(var A, B, C: integer);
var
t: integer;
begin
if A < B then begin
t := B;
B := A;
A := t
end;
if A < C then begin
t := C;
C := A;
A := t
end;
if B < C then begin
t := C;
C := B;
B := t
end
end;
var
A, B, C: integer;
begin
writeln('Введите три числа: ');
readln(A, B, C);
Sort(A, B, C);
writeln('Числа по убыванию: ', A, ' ', B, ' ', C)
end.