Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let nth_prime n =
- let myprimes = Stack.create in
- let primestatus p = eratos n in
- let prime_count = ref 1 in
- for index = 0 to length primestatus do
- if primestatus( index ) == true then
- begin
- push index myprimes ;
- prime_count := !prime_count + 1 ;
- end
- done ;
- pop myprimes ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement