Large Prime check

in the bool isPrime function why are we taking squares of the stored prime numbers? but instead we should take squares of numbers from 0 to square root of (No) i.e. Large Number.
Code Link -> https://ide.codingblocks.com/s/406300

Hello @meet1708 in this we are doing prime[i]*prime[i]<=no because here we are checking for all the devisors of prime number less then route n.
if the number in this range divides the number then it is not the primenumber otherwise it will be the prime number.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.