+ 1
Prime numbers
i come across this statement while working with prime numbers-"no number is divisible by more than its half" which i don't really agree. for example 100 divided by 51 is 1 point something. what do they meant by that statement.
3 Respuestas
+ 5
divisible
/dɪˈvɪzɪb(ə)l/
adjective
2.
MATHEMATICS
(of a number) containing another number a number of times without a remainder.
"24 is divisible by 4"
^
+ 2
I think what they're trying to refer to is that no number can be divided by a number greater than its half to equal a whole number. You can use this while trying to find prime numbers by setting a statement that only searches for any number less than or equal to half of the value of the number that it can be evenly divided into.
0
I would do a loop that start from 2 to the square root of the number, instead of the half of the number.