Sign in
gerrit
/
prolog-cafe
/
cdbce7081751fdfe9370e9f7c29aa426273c4b50
/
.
/
examples
/
benchmarks
/
portland
/
hanoi.pl
blob: f3e8c71fc9930b1a4ffca70269665b90d319673d [
file
] [
log
] [
blame
]
/*
VAX C
-
Prolog
Benchmark
Package
*
/
/
*
Copyright
1985
by
Tektronix
,
Inc
.,
and
Portland
State
University
*/
hanoi
(
N
)
:-
move
(
N
,
left
,
center
,
right
).
move
(
0
,
_
,
_
,
_
)
:-
!.
move
(
N
,
A
,
B
,
C
)
:-
M is N
-
1
,
move
(
M
,
A
,
C
,
B
),
move
(
M
,
C
,
B
,
A
).