Procedure maximum(a,b:integer; var max:integer); begin if a>b then max:=a else max:=b; end; var x,y,z,q,w,max:integer; begin writeln ('Введи 5 чисел'); Readln (x,y,z,q,w); maximum(x,y,max); maximum(max,z,max); maximum(max,q,max); maximum (max,w,max); writeln (max); end.
{ Лаконично :) } begin var a: array [1..5] of Int64; var i: byte; for i := 1 to 5 do readln(a[i]); writeln('Max: ', System.Math.Max(a[1], System.Math.Max(a[2], System.Math.Max(a[3], System.Math.Max(a[4], a[5]; end.
begin
if a>b then max:=a
else max:=b;
end;
var x,y,z,q,w,max:integer;
begin
writeln ('Введи 5 чисел');
Readln (x,y,z,q,w);
maximum(x,y,max);
maximum(max,z,max);
maximum(max,q,max);
maximum (max,w,max);
writeln (max);
end.
begin
var a: array [1..5] of Int64;
var i: byte;
for i := 1 to 5 do readln(a[i]);
writeln('Max: ', System.Math.Max(a[1], System.Math.Max(a[2], System.Math.Max(a[3], System.Math.Max(a[4], a[5];
end.