Question: C++ Recursion (Header File and Driver File Needed) Please show output ran through a terminal Your program will contain two different recursive functions to accomplish

C++ Recursion (Header File and Driver File Needed) Please show output ran through a terminal

Your program will contain two different recursive functions to accomplish two different tasks.

The first task will be to compute the final value of an account that is accruing compound interest. Your program will read from a file called bank_accounts.dat. This file will have one line for each different account for which you need to calculate the interest. The data on each line is made up of the following values:

Starting value Term Length (in months) Monthly interest rate

For each account, your program should call the recursive function, sending the data read from the file. Once the final value is calculated, the following information should be displayed to the screen:

Final value (dollars) Total interest earned (dollars)

The second task will be to reverse the digits in an integer. For example, if the number 345 is passed to your function, it should return the value 543. Your program will read a sequence of integers from a file called numbers.dat. For each number in the file, call your recursive function and display the return value to the screen. Your function should not use any string manipulation, only mathematical calculations.

Make sure your program is properly documented and good programming standards are followed.

-----------bank_accounts.dat--------------------------------------------------------

15000 36 2

20000 24 3

40000 36 3

50000 48 2

---------------------numbers.dat---------------------------------

123 345 100 1001 62

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!