Download or view NancyDrewDogsPuzzle.frink in plain text format
// Solves the "Waldo" tombstone puzzle in Nancy Drew
// Ghost Dogs of Moon Lake
n = 1
target = input["Enter target number: "]
multifor [a1,a2,a3,a4,a5,a6,a7,a8] = makeArray[[8], noEval[0 to n]]
{
c1 = (2 + a1 + a2) mod 6
c2 = (3 + a1 + a2) mod 6
c3 = (2 + a1 + a2 + a3 + a5 + a8) mod 6
c4 = (4 + a1 + a3 + a4 + a5 + a7) mod 6
c5 = (1 + a1 + a2 + a3 + a4 + a5 + a7 + a8) mod 6
c6 = (4 + a3 + a4 + a5 + a6 + a7) mod 6
c7 = (5 + a3 + a4 + a7 + a8) mod 6
c8 = (4 + a2 + a8) mod 6
res = "$c1$c2$c3$c4$c5$c6$c7$c8"
println["$a1$a2$a3$a4$a5$a6$a7$a8 $res"]
if target == res
println["$a1$a2$a3$a4$a5$a6$a7$a8"]
}
Download or view NancyDrewDogsPuzzle.frink in plain text format
This is a program written in the programming language Frink.
For more information, view the Frink
Documentation or see More Sample Frink Programs.
Alan Eliasen was born 20136 days, 4 hours, 24 minutes ago.