import java.io.*;
public class NumJudge{
public static void main(String args[]) throws IOException
{
InputStreamReader ir;
BufferedReader in;
ir=new InputStreamReader(System.in);
in=new BufferedReader(ir);
System.out.println("Input n is:");
String s=in.readLine();
int n=Integer.parseInt(s);
boolean b=true;
for(int i=2;i<n/2;i++)
{
if(n%i==0)
{
b=false;
break;
}
}
if(b)
{
System.out.println(n+" is not a prime num");
}
else
{
System.out.println(n+" is a prime num");
}
}
}
看下我这个程序哪里有问题 为什么总是判断不对呢