Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > BOOK: Ivor Horton's Beginning Java, Java 7 Edition
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 21st, 2012, 06:18 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2012
Location: kenya
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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can anyone help me with a java programming? Danchez Java Espanol 0 February 18th, 2011 05: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



All times are GMT -4. The time now is 01:30 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.