Question: in one code 1. Make one recursive function shownumbtos(). The function takes one integer n as parameter. The function will not return any value, but

1. Make one recursive function shownumbtos(). The function takes one integer n as parameter. The function will not return any value, but it will display n(n1)(n2)..321. The precondition is that n is a positive integer when this function is called. For example, in the main function, if there is a call shownumbtos(6), the following will be displayed: 654321 2. Make a recursive function shownumstob( ). The function is similar to the shownumbtos ( ) in question \#1, but this function will display the numbers from 1 to n. For example, shownumstob(6); will display 123456 3. Make one recursive function double p(b,e). It will return (not display) the value of b raised to the power of e. For example, cout p(2,3); will display 8 , which is 222. The precondition is that b and e are both positive integers. 4. Make one recursive function f(). The function takes one integer n as parameter. It will return the value of n(n1) (n2)321. The precondition is that n is a positive integer. 5. In your main function, 5a. ask the user to enter a number and call shownumbtos() to show the result. 5b. use the same user input to call shownumstob() to show 5b. use the same user input to call shownumstob( ) to show the result. 5c. use the same user input to display the result by calling f( ) function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
