From 8cfcd87e50121f20be175d341bfddd55e35ab7c2 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Tue, 13 Oct 2015 13:15:12 -0400 Subject: no, 9 is not prime --- minic/test/prime.c | 4 ++-- 1 file 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) -- cgit 1.4.1