Can we make recursive primal numbers function? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can we make recursive primal numbers function?

any lang

24th Apr 2017, 4:30 PM
Burak Usluer
Burak Usluer - avatar
4 Answers
24th Apr 2017, 10:22 PM
Bebida Roja
Bebida Roja - avatar
+ 2
You could make a function that returns the first prime following a number, which is the output of such function's previous iteration, and make an end case, like the depth of the recursion to tell the nth prime.
24th Apr 2017, 5:57 PM
Bebida Roja
Bebida Roja - avatar
+ 1
thx but would you please write code any lang
24th Apr 2017, 9:10 PM
Burak Usluer
Burak Usluer - avatar
+ 1
thx again
28th Apr 2017, 11:55 AM
Burak Usluer
Burak Usluer - avatar