Posts

Showing posts from September, 2022
Image
  PROGRAM 4: GOLDBACH NUMBER PROGRAM IN JAVA A GoldBach number is a positive even integer that can be expressed as the sum of two odd primes Note: All even integer numbers greater than 4 are GoldBach numbers. Example: 6              =              3 + 3 10            =              3+7 10            =              5+5 Hence 6 has one odd prime pair 3 and 3. Similarly, 10 has two odd prime pairs, i.e. 3 and 7. Write a program to accept an even integer ‘N’ where N>9 and N<50. Find all the odd prime pairs, whose sum is equal to the number ‘N’   Test your program with the following data and some random data.   Ex...