Challenge task Write a method isPrime(int n) that returns true if the parameter n is a prime number, and false if it is not. To implement the method, you can write while loop that divides n by all numbers between 2 and (n–1) and tests whether the division yields a whole number. You can write this test by using the modulo operator (%) to check whether the integer division leaves a remainder of 0 (see the discussion of the modulo operatorin Section 3.8.3).
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.