summaryrefslogtreecommitdiff
path: root/2017/23-prog.txt
blob: 7fbc42a05c30b9328e3c2b34fd9bd61d3b906f5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
for (b = 106700; b != 123700; b += 17) {
	f = 1;  // is b prime?

	for (d = 2; d != b; d++) {
		for (e = 2; e != b; e++) {
			if (d * e == b) f = 0;  // nope, it's d * e
		}
	}

	if (f == 0) h++;
}

// h = numprimes([106700, 106717 ... 123700])