> How do you create a java program that determines whether a number is prime or not without using the % modulus? anyone kn

How do you create a java program that determines whether a number is prime or not without using the % modulus? anyone kn

Posted at: 2014-12-18 
Instead of 14%3

Use

((14/3.0) - (14/3)) * 3

The first division is floating point division, the 2nd one is integer division.

How about using the Sieve Of Eratosthenes?

http://www.javacodex.com/Math-Examples/S...