#include
#include
#include
#include
void fun(int m,int *k,int xx[])
{
int i,j,n=0,t;
for(i=100;i
t=1;
for(j=2;j if(i%j==0)
{
t=0;
break;
}
if(t==1)
xx[n++]=i;
}
*k=n;
}
void main()
{
int m,n,zz[100];
system("CLS");
printf("please enter the up number:\n");
scanf("%d",&n);
fun(n,&m,zz);
printf("\nthere are %dprime number less than %d:\n\n ",m,n);
for(n=0;n
}
提示叫你输入数字的时候,你输入500就可以看见这中间的素数了