I need help with my hw. I need help with the recursion part of the code.
Here's the instructions:
First, the program needs to ask the user for a Natural number greater than 1, input the number, and validate that a number was input and that the number is in an acceptable range (Integer > 1). The program should then call the void function primefactor( ). This function should take in only one parameter of type long. Using recursion, this function will print out:
Here's what it should look like:
Please enter a Whole number greater than 1: 5
5 = (5) :Prime!
Continue?(Y/N) Y
Please enter a Whole number greater than 1: 28
28 = (2)(2)(7)
Continue?(Y/N) N