Download or view previousPrimeTest.frink in plain text format
prevPrimes = new array
n = previousPrime[10000]
do
{
prevPrimes.pushFirst[n]
n = previousPrime[n]
} while n != undef
nextPrimes = new array
n = 2
do
{
nextPrimes.push[n]
n = nextPrime[n]
} while n < 10000
println["prevPrimes is $prevPrimes"]
println["nextPrimes is $nextPrimes"]
println[prevPrimes == nextPrimes ? "OK" : "ERROR"]
Download or view previousPrimeTest.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 20217 days, 23 hours, 36 minutes ago.