Find the sum of all the prime numbers
View Single Post
yes i got you!
the thing is we dont need to go more than the sqrt of the no. which to be checked as prime if it is not divisibe by any no. upto sqrt(n) than there wont be any factor above that you can check it for any no.