program maksi;
uses crt;
function nilai(a,b:integer):integer;
begin
if a>b then
nilai:=a
else if a<b then
nilai :=b else;
end;
{prog utama}
var x,y,hasil:integer;
begin
clrscr;
write('input1= ');readln(x);
write('input2= ');readln(y);
hasil:=nilai(x,y);
writeln('nilai maksimum= ',hasil);
readln;
end.
No comments:
Post a Comment