Goldbach’s conjecture – Every even integer greater than 2 can be represented as the sum of two primes numbers.

Example:

Given Number : 200

Prime Numbers are 3 197
Prime Numbers are 7 193
Prime Numbers are 19 181
Prime Numbers are 37 163
Prime Numbers are 43 157
Prime Numbers are 61 139
Prime Numbers are 73 127
Prime Numbers are 97 103

Approach:

Check if number if not even, return.

Check if number is less than 2, return.

Navigate i, from 3 to number check if i and (x-i) is prime, if yes, Print it

Code:

Output :
Prime Numbers are 3 97
Prime Numbers are 11 89
Prime Numbers are 17 83
Prime Numbers are 29 71
Prime Numbers are 41 59
Prime Numbers are 47 53

__________________________________________________ Top Companies Interview Questions..-

If you find anything incorrect or you feel that there is any better approach to solve the above problem, please write comment.
__________________________________________________