0
How to find a number is prime number or not
4 odpowiedzi
+ 1
75/2 = 37.5 or 75%2 = 1 so continue testing
75/3 = 25 or 75%3 = 0 so testing complete
75 is not a prime number
Try 11
Square root of 11 is 3.32 so we only need to test up to 3.
11/2 = 5.5 or 11%2 = 1 so continue
11/3 = 3.6666667 or 11%3 = 1
No whole number results. Therefore 11 is a prime number.
0
For numbers that aren’t too big, the simplest way is to try dividing the number by everything from 2 to the square root of the number and see if the result is a whole number. If a test along the way results in a whole number, stop the test because it’s not a prime number.
0
If n=75 is prime number or not