10001th prime: Difference between revisions

Content added Content deleted
m (→‎{{header|C#|CSharp}}: subtitle added)
m (→‎{{header|QB64}}: enabled syntax hi-lighting by changing lang tag from "QB64" to "qbasic")
Line 548: Line 548:
=={{header|QB64}}==
=={{header|QB64}}==
===Trial Division Method===
===Trial Division Method===
<lang QB64>max=10001: n=1: p=0: t=Timer ' PRIMES.bas russian DANILIN
<lang qbasic>max=10001: n=1: p=0: t=Timer ' PRIMES.bas russian DANILIN
While n <= max ' 10001 104743 0.35 seconds
While n <= max ' 10001 104743 0.35 seconds
f=0: j=2
f=0: j=2
Line 564: Line 564:


===More Efficient TD Method===
===More Efficient TD Method===
<lang QB64>'JRace's results:
<lang qbasic>'JRace's results:
'Original version: 10001 104743 .21875
'Original version: 10001 104743 .21875
'This version: 10001 104743 .109375
'This version: 10001 104743 .109375