0
How Can we change this program to print the prime numbers in range(x).
the below program tells you the number is a prime or not. but how can we change this program to print the n prime numbers? i tried some methods but they are not working can anyone help me? https://code.sololearn.com/cWoOtM36qiAV/?ref=app
5 Respostas
0
https://code.sololearn.com/cRj8TlSSWJ5L/?ref=app
0
Namit Jain it is printing 4 also
0
Mr. 12 Now see the code!
Sorry I didn't read the question correctly
0
Namit Jain can you explain me your code?
0
Mr. 12 I have made 2 functions!
One is to check whether the inputs is prime or not
The other is to find the next prime number to the present prime number!
And both of them are used in the for loop as told by you