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