A void function that doesn't print?

I'm not exactly sure why, but the void function 'printTwinPrimes' does not print anything.

Last edited on
1
2
3
4
5
   int i = start;
   int j = start + 1;
//...
			 i += 2;
			 j += 2;

j-i would always be 1
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.
Topic archived. No new replies allowed.