void fun(int x,int pp[],int *n){int m,k,a=0;int i;for(m=0;m<100;m++)if(m%x==0)/**/{k=sqrt(m);for(i=0;iif(m%i==0)break;}if(i==k+1){pp[a++]=m;n++;}return n;}大概是这样吧,试试