fork download
  1. program :- get_char(X),get_char(Y),check(X,Y).
  2. check('4','2'):-!.
  3. check(X,Y):-write(X),get_char(Z),check(Y,Z).
  4. :- program.
Success #stdin #stdout 0.02s 68352KB
stdin
1
2
10
9
0
10
42
stdout
GNU Prolog 1.3.1
By Daniel Diaz
Copyright (C) 1999-2009 Daniel Diaz
uncaught exception: error(syntax_error('user_input:2 (char:1) . or operator expected after expression'),read_term/3)