Calypso number(programming in JAVA)
Please Help me how to go about this program:
. A Calypso number is defined to be one that is the sum of more than one pair of prime numbers. Recall that a prime number is a number greater than 1 whose only divisors are 1 and itself.
For example, 16 is a Calypso number because 16=3+13 and 5+11 (note that 3, 5, 11, and 13 are all prime). 24 is a Calypso number because 24 = 5+19, 7+17 and 11+13. However, 8 is not a Calypso number because 8 = 3+5 but no other pair of primes sums to 8.
Write a function named isCalypso that returns 1 if its argument is a Calypso number, otherwise it returns 0.
The function signature is
int isCalypsoNumber (int n)
You may assume that a function named isPrime already exists that returns 1 if its argument is a prime. You can call this function but do not have to write it.
|