Results 1 to 4 of 4
Thread: Java EKG program
 07122012, 03:40 AM #1Member
 Join Date
 Jul 2012
 Posts
 2
 Rep Power
 0
Java EKG program
I am having trouble starting a program to compute the ekg. can anyone help
• Every number after that is the smallest number that is not in the sequence, and shares a factor larger than 1 with the last number
The first 10 numbers in the EKG sequence are
1,2,4,6,3,9,12,8,10,5
The program you turn in is to read in an integer n and compute and print the first n terms in the EKG sequence.
Your program should also include a function (or method) to compute GCD using Euclid’s algorithm (which is found on page 4 of your book). You are to use this function to determine if a candidate shares a factor larger than 1 with the last number in the sequence.
 07122012, 10:21 AM #2
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,271
 Blog Entries
 7
 Rep Power
 24
Re: Java EKG program
Are the numbers 1 and 2 supposed to be the first two numbers in that sequence by definition?
kind regards,
JosThe only person who got everything done by Friday was Robinson Crusoe.
 07122012, 02:34 PM #3Member
 Join Date
 Jul 2012
 Posts
 2
 Rep Power
 0
 07122012, 04:28 PM #4
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,271
 Blog Entries
 7
 Rep Power
 24
Similar Threads

Call one Java Program from another Java Program
By rajpalparyani in forum New To JavaReplies: 3Last Post: 02142011, 05:13 AM 
Is There A Way To Call Another Java Program Within A Java Program
By SwissR in forum New To JavaReplies: 4Last Post: 07302010, 12:25 PM 
execute java program within java program
By popey in forum New To JavaReplies: 2Last Post: 10222009, 05:32 PM 
How to execute an External Program through Java program
By Java Tip in forum java.ioReplies: 0Last Post: 04042008, 02:40 PM 
How to execute an External Program through Java program
By JavaBean in forum Java TipReplies: 0Last Post: 10042007, 09:33 PM
Bookmarks