Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Must be done in Java. Create a program which prompts the user for a number. The program then calculates the prime factors of that number USING REC...

Must be done in Java.

Create a program which prompts the user for a number.  The program then calculates the prime factors of that number USING RECURSION.  If you don't use recursion in your program, you will not get credit.  

Your program should then output the prime factors in sorted order.  

For example, the prime factors for 6 are 2x3.  For 12,  2 is a prime factor, leaving 6 (2x6=12).  So, you could then determine the prime factors of 6, resulting in 2 and 3 as the prime factors. Thus, the factors are 2, 2, 3.  

This example also gives you a hint regarding a recursive algorithm.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question