function besar (a,b : integer) : integer;
begin
if a<b then
besar := a
else
besar := b;
end;
var
a,b: integer;
begin
clrscr;
write('nilai bilangan 1 = '); readln(a);
writeln;
write('nilai bilangan 2 = '); readln(b);
writeln;
write('bilangan terbesar = ', besar (a,b):5);
readln;
end.
Tidak ada komentar:
Posting Komentar