uses crt;
var a,b,c,d: integer;
function max(a,b,c,d: integer): integer;
begin
if (a>=b) and (a>=c) and (a>=d) then max:=a;
if (b>=a) and (>=c) and (>=d) then max:=b;
if (c>=a) and (>=b) and (>=d) then max:=c;
if (d>=a) and (>=c) and (>=b) then max:=d;
end;
begin
clrscr;
write ('nhap a: '); readln (a);
write ('nhap b: '); readln (b);
write ('nhap c: '); readln (c);
write ('nhap d: '); readln (d);
writeln ('so lon nhat la: ',max(a,b,c,d));
readln;
end.