program TimSoLonNhat;
var
a, b, c, d, max: integer;
begin
write('Nhap a: '); readln(a);
write('Nhap b: '); readln(b);
write('Nhap c: '); readln(c);
write('Nhap d: '); readln(d);
max := a;
if b > max then
max := b;
if c > max then
max := c;
if d > max then
max := d;
writeln('So lon nhat la: ', max);
readln;
end.
program TimSoLonNhat;
var a, b, c, d: integer;
begin
writeln('Nhap vao gia tri cua a: ');
readln(a);
writeln('Nhap vao gia tri cua b: ');
readln(b);
writeln('Nhap vao gia tri cua c: ');
readln(c);
writeln('Nhap vao gia tri cua d: ');
readln(d);
if (a > b) and (a > c) and (a > d) then
writeln('So lon nhat la: ', a)
else if (b > a) and (b > c) and (b > d) then
writeln('So lon nhat la: ', b)
else if (c > a) and (c > b) and (c > d) then
writeln('So lon nhat la: ', c)
else
writeln('So lon nhat la: ', d);
readln;
end.