public class test2 {
public static void main(String[] args) {
int a = 20150918;
boolean sss=true;
for(int b=2;b<=a/2;b++){
if(a%b == 0){
sss = false;
break;
}
if(sss){
System.out.println("素数是"+a);
break;
}
else{
++a;
}
}
}
}
public class test2 {
public static void main(String[] args) {
int a;
int b;
for(a=2;a<=100;a++){
if (a <= 3) {
System.out.println("素数是"+a);
} else {
for( b=2;b<=a/2;b++){
if((a%b)==0)
{
break;
}else{
if(b>=a/2)System.out.println("素数是"+a);
}
}
}
}
}
}