->

From, Limit = 0 ..

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

Do Say i [ i, IS_PRIME ]
Where i = From to Limit

/

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

Is_prime = 1 [ N > 1 ]

Do i = 2 to N - 1
 If N _% i then
  Is_prime = 0; Leave
 Else
  Iterate
 ;
;

/