标签:mat break style ret code bsp 素数 i++ class
#include <stdio.h> #include <math.h> int main() { int i,j,m; printf("2 "); for(i=3;i<=10000;i++){ m = sqrt(i); for(j=2;j<=m;j++){ if(i%j==0){ break; } } if(j>=m+1){ printf("%d ",i); } } return 0; }
标签:mat break style ret code bsp 素数 i++ class
原文地址:https://www.cnblogs.com/zoulingjin/p/9629822.html