Advertisement
Guest User

Untitled

a guest
Nov 12th, 2013
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. let nth_prime n =
  2. let myprimes = Stack.create in
  3. let primestatus p = eratos n in
  4. let prime_count = ref 1 in
  5. for index = 0 to length primestatus do
  6. if primestatus( index ) == true then
  7. begin
  8. push index myprimes ;
  9. prime_count := !prime_count + 1 ;
  10. end
  11. done ;
  12. pop myprimes ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement