/*********************************************************
http://projecteuler.net/problem=7
By listing the first six prime numbers: 2, 3, 5, 7, 11, and
13, we can see that the 6th prime is 13.
What is the 10 001st prime number?
*********************************************************/
main =>
I = 11,
Count = 4,
while (Count !== 10001)
if (prime(I)) then % prime defined in module math.
Count := Count+1
end,
I := I + 2
end,
writef("The 10001st prime number is %w%n",I-2).