uses crt; var a,b,c:integer; function max(x,y,z:integer):integer; begin max:=x; if y>x then max:=y; if z>x then max:=z; end; begin write(‘Nhap a: ‘); readln(a); write(‘Nhap b: ‘); readln(b); write(‘Nhap c: ‘); readln(c); write(‘Gia tri lon nhat la: ‘,max(a,b,c)); readln end.
program GTLN;
uses crt;
var a,b,c:integer;
{—–Chuong-trinh-con——}
function max(x,y,z:integer):integer;
begin
max:=x;
if y>max then max:=y;
if z>max then max:=z;
end;
{——Chuong-trinh-chinh——}
BEGIN
clrscr;
write(‘Nhap so thu nhat: ‘); readln(a);
write(‘Nhap so thu hai: ‘); readln(b);
write(‘Nhap so thu ba: ‘); readln(c);
write(‘Gia tri lon nhat la: ‘,max(a,b,c));
readln;
end.
uses crt;
var a,b,c:integer;
function max(x,y,z:integer):integer;
begin
max:=x;
if y>x then max:=y;
if z>x then max:=z;
end;
begin
write(‘Nhap a: ‘); readln(a);
write(‘Nhap b: ‘); readln(b);
write(‘Nhap c: ‘); readln(c);
write(‘Gia tri lon nhat la: ‘,max(a,b,c));
readln
end.