素数程序

ackage 素数;

public class 素数
{
public static void main(String arg[]){
int i=1,j=2;
do{
j=2;
while((i%j!=0)&&i>j){
j++;

}
if(i==j)

System.out.println(i);
i++;
}while(i<=100);

}}

原文地址:https://www.cnblogs.com/LY1314/p/6592396.html