#include
#include
int main(void)
{
int i,j,p,m,n,count;
count=0;
printf("input m(m>1):");
scanf("%d",&m);
printf("input n(n<=500):");
scanf("%d",&n);
for(i=m>1?m:2;i<=n;i++){//此处修改
p=sqrt(1.0*i);
for(j=2;j<=p;j++)
if(i%j==0) break;
if(j>p)
{
printf("%6d",i);
count++;
}
if(count%6==0)
printf("\n");
}
return 0;
}