问题描述:
代码:
/**
* @author cs
*/
public class APP8 {
public static void main(String[] args) {
boolean flag =true;
int [] num = {56,68,587,98,32,57,65,48,1957,36};
for(int i= 0; i<num.length;i ++){
for(int j= 2;j <num[i]; j++){
if(num[i] %j== 0) {
flag = false;
break;
}
flag = true;
}
if(flag == true)
System.out.print(num[i]);
}
}
}