Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.42 KB | None | 0 0
  1. program problem1(input, output);
  2. var max, x: integer;
  3. begin
  4.     read(max, x);
  5.     while x <> 0 do
  6.         begin
  7.             if max < x then max := x;
  8.             read(x)
  9.         end;
  10.         write(max)
  11. end.
  12.  
  13.  
  14.  
  15.  
  16.  
  17. program problem1(input, output);
  18. var x, max: integer;
  19. begin
  20.     read(x);
  21.     max := x;
  22.     repeat
  23.         if max < x then max := x;
  24.         read(x)
  25.     until x = 0;
  26.     write(max)
  27. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement