Wrox Programmer Forums
|
BOOK: Ivor Horton's Beginning Java, Java 7 Edition
This is the forum to discuss the Wrox book Ivor Horton's Beginning Java, Java 7 Edition by Ivor Horton ; ISBN: 978-0-470-40414-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Ivor Horton's Beginning Java, Java 7 Edition section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 21st, 2012, 06:18 PM
Registered User
 
Join Date: Aug 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Wink 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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can anyone help me with a java programming? Danchez Java Espanol 0 February 18th, 2011 06:20 AM
Java Programming azaira Java Basics 1 August 20th, 2009 02:48 AM
java programming gadblez Java GUI 3 August 18th, 2009 09:44 PM
professional java programming ashishroyk All Other Wrox Books 0 October 8th, 2004 03:27 AM
New to Java Programming oldace65 Javascript How-To 4 June 25th, 2004 04:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.