->

From, Limit = 0 ..

Ask 'Start from: ' From
Ask 'Repeat to: ' Limit

Do Say i [ i IS_PRIME ]
Where i = From to Limit
' From = 2 [ From < 2 ]

Exit

IsPrime : -a ->
Arg N : Integer, . : IS_PRIME, - Is_prime = 1 ..
+

 CheckRemainder ->

 If N _% i then Is_prime = 0, Leave
 Else Iterate

 Return

+

Do CheckRemainder
Where i = 2 to Div_to
' Div_to = N - 1

Return