+ 1
Do we use array fo declaration of prime numbers?
There is any mathematical code to declare prime number or we only use arrays for it.
2 Antworten
+ 1
for(i = 2; i <= n / 2; ++i) { if(n % i == 0) { isPrime = false; break; } }
you just have to use this logic
0
Mohit the coder (M.S.D) thanks for the great answer. I am just a beginner.