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); 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);
writeln('числа: ',a,' ',b,' ',c);
end.