Find prime numbers of the form n*n*n+2: Difference between revisions

m
Minor edit to Forth code
(Added C++ solution)
m (Minor edit to Forth code)
Line 399:
 
: main
200 01 do
i i i * * 2 + dup prime? if
i 3 .r 9 .r cr
Line 405:
drop
then
2 +loop ;
 
main
1,777

edits