0

Prime Numbers

What is the smallest program to check if the number is prime?

19th Dec 2019, 2:49 PM
Cristian Daraban
Cristian Daraban - avatar
2 odpowiedzi
+ 1
why not try it out on a code and see for yourself, that will even help you better, than for someone to tell you the answer and explain it, the person who answered will improve alot and you little, but if you try it yourself you will learn alot and understand that better
19th Dec 2019, 4:28 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 1
In Java you can use this boolean isPrime = new BigInteger(yourNumber).isProbablePrime(10);
19th Dec 2019, 5:35 PM
Abdol Hashimi
Abdol Hashimi - avatar