Hello, I'm writing an assignment that prints out these number that change if the user entered number is a certain value (see code). This is done with a recursive function. Now I need to write the same recursive function and print the same output, only in reverse, and I'm not sure how to do that.
So my question is, how can I write the same recursive function, but change it so that is prints in reverse? Thanks!
If you want to reverse the order of the output, simply move the output after the recursive function call. You will find it impossible to put the newline and the call to lengthOJP in the right place, however. IMO, neither belonged in the function.