Question: Problem 5 ( Saving Account ) ) Suppose that you put $ 1 0 0 into a savings account every month and don t withdraw
Problem
Saving Account
Suppose that you put
$
into a savings account every month and dont withdraw any
pennies from it If the annual interest rate of saving is then we can derive monthly
saving interest rate equal to
After first month, your saving account has
$
$
After second month, your saving account has
$ $
$
After third month, your saving account has
$
$
After kth month, your saving account has
$
The amout of
k
th
month
Write a program name
compound
value.cpp
that reads from commandline arguments
three values:
A
float
I
float and
M
int In which,
A
represents amount of money that
you put in saving account every month;
I
represents annual interest rate for saving account,
and
M
reprensents number of months. Compute and display the amount of money you saved
after
M
months.
Your program must report error message
"Invalid amount of money!"
if
A
and
display the message
"Invalid number of months!"
if
M
Here are sample outputs when running the program from a terminal:
workspacecschw
$
go srccompoundvalue.out outcompoundvalue.cpp
$
outcompoundvalue.out
After months saved money
$
$
outcompoundvalue.out
After months saved money
$
$
outcompoundvalue.out
After months saved money
$
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
