home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / P_PASCAL.ZIP / SAMPLES / MAX.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-04-22  |  277 b   |  15 lines

  1. (*$c+*)
  2. program example(input,output);
  3. var x,y : integer;
  4. function max(z,w : integer) : integer;
  5. begin
  6.     if z < w then max := w
  7.     else
  8.         max := z
  9. end;
  10. begin
  11.     write('Type: x= '); readln(x);
  12.     write('Type: y= '); readln(y);
  13.     writeln('max = ', max(x, y) : 3, '.')
  14. end.
  15.