aboutsummaryrefslogtreecommitdiff
path: root/minic
diff options
context:
space:
mode:
authorQuentin Carbonneaux <[email protected]>2015-10-13 13:15:12 -0400
committerQuentin Carbonneaux <[email protected]>2015-10-13 13:15:12 -0400
commit8cfcd87e50121f20be175d341bfddd55e35ab7c2 (patch)
tree8e31d78f8af45bf00bbc803691733563d5dbd99f /minic
parente2fca0812b8ad880b8908dfe025ffe7d79f008cb (diff)
no, 9 is not prime
Diffstat (limited to 'minic')
-rw-r--r--minic/test/prime.c4
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)