From ccd6bd869c4b793815155432af9d48e1a051679c Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Mon, 12 Oct 2015 16:20:59 -0400 Subject: fix stupid bug in the example --- minic/test/prime.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/minic/test/prime.c b/minic/test/prime.c index e1d1074..182cb3d 100644 --- a/minic/test/prime.c +++ b/minic/test/prime.c @@ -7,9 +7,6 @@ main() { c = 0; n = 2; while (n < 1000) { - if (c % 10 == 0) - if (c != 0) - printf("\n"); t = 2; p = 1; while (t*t <= n) { @@ -18,10 +15,13 @@ main() { t = t + 2; } if (p) { + if (c % 10 == 0) + if (c != 0) + printf("\n"); printf("%4d ", n); c++; } - n = n + 2; + n++; } printf("\n"); } -- cgit 1.4.1