0

java program to find prime numbers

4th Aug 2019, 9:09 AM
vijay nayak
vijay nayak - avatar
3 Respostas
+ 2
I guess you mean: you need help creating one... I'm not telling you the solution just a few hints, so you can try it your self, since it's not that hard ... a prime number only has two divisors 1 and itself. you can test if a number is a divisor of another using the modulo operator (%), which returns the remainder of an hole-division. (if the remainder is not 0, the number is not divisor)
4th Aug 2019, 9:35 AM
Anton Böhler
Anton Böhler - avatar
+ 2
thanks
4th Aug 2019, 10:12 AM
vijay nayak
vijay nayak - avatar