10001th prime: Difference between revisions
Content added Content deleted
(Created page with "{{Draft task}} ;Task: <br>Find and show on this page 10001th prime <br><br> =={{header|Ring}}== <lang ring> load "stdlib.ring" see "working..." + nl num = 0 pr = 0 limit = 1...") |
No edit summary |
||
Line 17: | Line 17: | ||
if isprime(num) |
if isprime(num) |
||
pr++ |
pr++ |
||
//see "" + num + " " |
|||
ok |
ok |
||
if pr = limit |
if pr = limit |
Revision as of 18:50, 16 November 2021
10001th prime is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.
- Task
Find and show on this page 10001th prime
Ring
<lang ring> load "stdlib.ring" see "working..." + nl num = 0 pr = 0 limit = 10001
while true
num++ if isprime(num) pr++ ok if pr = limit exit ok
end
see "" + num + nl see "done..." + nl </lang>
- Output:
working... The 10001th prime is: 104743 done...