diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-10-13 13:15:12 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-10-13 13:15:12 -0400 |
commit | 8cfcd87e50121f20be175d341bfddd55e35ab7c2 (patch) | |
tree | 8e31d78f8af45bf00bbc803691733563d5dbd99f /minic/test | |
parent | e2fca0812b8ad880b8908dfe025ffe7d79f008cb (diff) | |
download | roux-8cfcd87e50121f20be175d341bfddd55e35ab7c2.tar.gz |
no, 9 is not prime
Diffstat (limited to 'minic/test')
-rw-r--r-- | minic/test/prime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/minic/test/prime.c b/minic/test/prime.c index 5d2cde9..4c82ee8 100644 --- a/minic/test/prime.c +++ b/minic/test/prime.c @@ -8,13 +8,13 @@ main() { c = 0; n = 2; - while (n < 1000) { + while (n < 5000) { t = 2; p = 1; while (t*t <= n) { if (n % t == 0) p = 0; - t = t + 2; + t++; } if (p) { if (c % 10 == 0) |