fork(1) download
  1. program ideone;
  2. var a, mx: integer;
  3. begin
  4. mx := -32767;
  5.  
  6. read(a);
  7. repeat
  8. if (mx < a) and (a mod 5 = 0) then
  9. mx := a;
  10. read(a);
  11. until a = 0;
  12.  
  13. write(mx);
  14. end.
Success #stdin #stdout 0s 5320KB
stdin
8
26
12
-10
47
25
-100
22
10
0
stdout
25