program min_4bil;
uses wincrt;
function min2(a,b:integer):integer;
var
x : integer;
begin
if a > b then
x:=a
else
x:=b;
min2:=x;
end;
var
a,b,c,d,x,y,z:integer;
begin
readln(a);
readln(b);
readln(c);
readln(d);
x:=min2(a,b);
y:=min2(c,d);
z:=min2(x,y);
writeln('nilai max = ',z);
end.
uses wincrt;
function min2(a,b:integer):integer;
var
x : integer;
begin
if a > b then
x:=a
else
x:=b;
min2:=x;
end;
var
a,b,c,d,x,y,z:integer;
begin
readln(a);
readln(b);
readln(c);
readln(d);
x:=min2(a,b);
y:=min2(c,d);
z:=min2(x,y);
writeln('nilai max = ',z);
end.
No comments:
Post a Comment