previousPrimeTest.frink

View or download 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"]


View or download 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 17715 days, 14 hours, 57 minutes ago.