Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have a problem for my C++ course. I have to write to a file, with the following conditions. ORIGINAL PROBLEM: In c++ A program

I have a problem for my C++ course. I have to write to a file, with the following conditions.

ORIGINAL PROBLEM:

"In c++ A program that calculates the balance of a savings account at the end of a three-

month period. It should ask the user for the starting balance and the annual interest

rate. A loop should then iterate once for every month in the period, performing the

following steps:

A) Ask the user for the total amount deposited into the account during that month

and add it to the balance. Do not accept negative numbers.

B) Ask the user for the total amount withdrawn from the account during that

month and subtract it from the balance. Do not accept negative numbers or

numbers greater than the balance after the deposits for the month have been

added in.

C) Calculate the interest for that month. The monthly interest rate is the annual

interest rate divided by 12. Multiply the monthly interest rate by the average of

that month%u2019s starting and ending balance to get the interest amount for the

month. This amount should be added to the balance."

MODIFIED:

Instead of displaying the output to the screen, write the output to the file.Instead of only 3 months, have the number of months be an input.Instead of displaying the final output after the three month period, A chart should be for the output.The report should look something like this but of course with data in it:

image text in transcribed
Savings Account Statement Month Opening Total Total Interest Ending Balance Deposits withdrawals Earned Balance 1 2 3 4 5 6 ? 8 9 16 11 12

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_2

Step: 3

blur-text-image_3

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

Transport Operations

Authors: Allen Stuart

2nd Edition

978-0470115398, 0470115394

Students also viewed these Programming questions