diff options
Diffstat (limited to '2017/23-prog.txt')
-rw-r--r-- | 2017/23-prog.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/2017/23-prog.txt b/2017/23-prog.txt new file mode 100644 index 0000000..7fbc42a --- /dev/null +++ b/2017/23-prog.txt @@ -0,0 +1,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]) |