• 2021-04-14
    下面程序是求100~200的全部素数,请填空 main() { int n, i, k, m = 0; for (n = 101; n <= 200; n = n + 2) { k = sqrt(n); for (i = 2; i <= k; i++) if (n%i == 0) ; if ( ) { printf("%d ", n); m = m + 1; } if (m % 10 == 0) printf("\n"); } printf("\n"); }
  • 举一反三