summary refs log tree commit diff
path: root/minic/test
diff options
context:
space:
mode:
Diffstat (limited to 'minic/test')
-rw-r--r--minic/test/prime.c8
1 files 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");
 }