Write a recursive function to convert a given string into the number it represents. That is input will be a numeric string that contains only numbers, you need to convert the string into corresponding integer and return the answer.
Input format: Numeric string (string, Eg. "1234")
Output format: Corresponding integer (int, Eg. 1234)
Sample Input 1: "1231"
Sample Output 1: 1231
Sample Input 1: "12567"
Sample Output 1: 12567
Algorithm:
Example:
C++ program:
Output