标签:mic printf [] mat \n style div alt com
# include <stdio.h> # include <math.h> int main(int argc, char* argv[]) { int i,j,k,n; int a[100]; n=sqrt(100); for(j=2;j<=n;j++) { if(a[j]!=1) { for(k=2;k<=100/j;k++) { a[k*j]=1; } } } for(k=2;k<=100;k++) { if(a[k]!=1) printf("%d\n",k); } return 0; }
标签:mic printf [] mat \n style div alt com
原文地址:https://www.cnblogs.com/P201821440046/p/10895808.html