15
1
Write a program that prompts the user for an even integer greater than 2.
Given Goldbach’s conjecture that every even integer greater than 2 can be expressed as the sum of two primes, print out two prime numbers which, when added together, provide the requested even number. Edit: the program only has to print A PAIR of primes, not all. For example:
4 : 2 + 2
6: 3 + 3
8: 3 + 5
10: 5 + 5 or 3 + 7
"only has to print a pair of primes" Does that mean we are allowed to print more pairs? – Ayiko – 2014-01-29T17:59:13.323
I suppose if it shortens the length of your code, but it should be organized – Rationality – 2014-01-30T04:34:55.457