hi, im trying to let user input a number, and send this number to my isPrime(num0 function.. my problem is i got this error : - unexpected type required: variable found : value
i guess it's my void main input output.. :- try { while (num1 != -1) {
if ( isPrime(num1) ) System.out.println (num1 + " ialah nombor perdana"); if ( isPrime(num1) = false ) System.out.println (num1 + " BUKAN nombor perdana");
The code snippet that you have supplied is insufficient to properly diagnose the problem. Cound you post the whole class (and enclose it in "java" blocks as per the instructions on "Formatting Your Post").