import java.util.*;
public class panduansushu {
public static void main(String args[]){
int x , y , j ;
boolean s = false ;
Scanner i = new Scanner(System.in);
System.out.print("请输入一个数:");
y = i.nextInt();
j = (int) y / 2 ;
for( x = 2 ; x <= j ; x++){
s = y % x == 0 ;
//System.out.println("测试1 s为"+s);
if(s = true){
System.out.println("此数不为素数");
}
else {
s = false ;
}
}
System.out.println("测试2 s为"+s);
if(s = false){
System.out.println("此数为素数");
}
}
}