relax one assert
[qbe.git] / minic / test / prime.c
blob1dd94e7bd1eb910d99f4cda744018c8e8ccff7c3
1 #include <stdio.h>
3 main() {
4 int n;
5 int t;
6 int c;
7 int p;
9 c = 0;
10 n = 2;
11 while (n < 5000) {
12 t = 2;
13 p = 1;
14 while (t*t <= n) {
15 if (n % t == 0)
16 p = 0;
17 t++;
19 if (p) {
20 if (c && c % 10 == 0)
21 printf("\n");
22 printf("%4d ", n);
23 c++;
25 n++;
27 printf("\n");