home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / interpre / p_pascal / samples / max.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-04-21  |  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.