InterviewSolution
Saved Bookmarks
| 1. |
Write a java program to check if any number given as input is the sum of 2 prime numbers. |
|
Answer» Example : Input - 18 Output - 18 = 13 + 5 In the above CODE, for any number N, we find all the 2 pairs of numbers that are added together resulting in n. And each checking number if it is prime. If it is prime then we are printing that. |
|