nextLargestPrime.frink

Download or view nextLargestPrime.frink in plain text format


// Finds the smallest prime with n or more digits.

digits = eval[input["Enter number of digits: "]]

start = now[]

n = 10^(digits-1)+1
println[nextPrime[n]]

end = now[]

println["Total time is " + (end-start -> "s")]


Download or view nextLargestPrime.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, 5 hours, 28 minutes ago.