I'm not exactly sure why, but the void function 'printTwinPrimes' does not print anything.
Last edited on
How? It's always incrementing at the end of the loop
You do set j to be i+1, so their difference cannot be 2.
You increment both variables by same amount, so their difference cannot change into 2.