include<stdio.h> include<math.h> int main(void){ int count,i,m,n;count=0;for(m=2;m<=100;m++){ n=sqrt(m);for(i=2;i<=n;i++)if(m%i==0)break;if(i>n){ printf("%6d",m);count++;if(count%10==0)printf("\n");} } printf("\n");retrun 0;} 希望可以帮...
include <stdio.h> int main( ){ int a[100],i,j;for(i=0;i<100;i++)a[i]=i+1;a[0]=0;for(i=1;i<100;i++){ if(a[i] == 0)continue;for(j=i+1;j<100;j++)if(a[j]%a[i] == 0)a[j] = 0;} j=0;for(i=0;i<100;i++){ if(a[i] != 0){ printf...