';' expected comes out when i compile, what's the problem with my while loop?
btw..i know this is not the best solution for making a program find out if it is a prime or not..
public class primenumberstesting2 { public static void main(String[]args){ int num; do{ } while(num >=0){ System.out.println("Enter a positive integral value: "); num = Keyboard.readInt(); int isPrime=0; for(int num1=1;num1<=100;num1++) { isPrime=0; for(int num2=1;num2<num1;num2++) { if(((num1%num2)==0) & num2!=1) { isPrime=1; } } if(isPrime==0) { System.out.println("Input is a prime number"); }else System.out.println("Input is a non-prime number"); } } } }