Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions