Question: In C++ DESCRIPTION Design, implement, and document recursive functions to solve three problems; test those functions by calling them from appropriate main functions, and document
In C++

DESCRIPTION Design, implement, and document recursive functions to solve three problems; test those functions by calling them from appropriate main functions, and document the functions. Throughout, keep in mind the three questions that arise in designing a recursive algorithm: What is/are smaller but identical subproblem(s)? How will the smaller solution(s) be used to solve the larger problem? What is/are the base case(s)? REPORT THE NUMBER OF DIGITS IN AN INTEGER Write a recursive function numdigs(k) that returns the number of (base 10) digits in its non-negative integer argument. A run of a program that exercises this function might look like this: Enter an integer: 12345 This integer contains 5 digits. REVERSE A STRING Write a recursive function reverse(s,n) that accepts an array s[ - ] whose initial segment contains n characters and prints out the characters in the segment in reverse order. A run of a program that exercises this function might look like this: Enter a string of characters: abcde 98765$A The reversed string is: A$56789edcba COMPUTING Write a recursive function exp(x,n) that computes x" for a real value x and a non-negative integer n. A run of the program that exercises this function might look like this: Enter a real value: 14.3 Enter a non-negative integer exponent: 3 14.3 ^ 3 = 2924.207
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
