Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is what i have so far and i'm stuck #include #include #include using namespace std; //function prototype double getBalance(int amount, double rate, int y);

image text in transcribed

this is what i have so far and i'm stuck

#include

#include

#include

using namespace std;

//function prototype

double getBalance(int amount, double rate, int y);

int main()

{

int deposit = 0;

double interestRate = 0.0;

double acctBalance = 0.0;

cout

cin >> deposit;

cout

cin >> interestRate;

cout

for (int year = 1; year

{

acctBalance =

getBalance(deposit, interestRate, year);

cout

} //end for

return 0;

} //end of main function

//*****function definitions*****

double getBalance(int amount, double rate, int y)

{

double balance = 0.0;

balance = amount * pow((1 + rate), y);

return balance;

} //end of getBalance function

19. In this exercise, you will modify the savings account program from Figure 9-18 in Chapter 9. Follow the instructions for starting C++ and viewing the Intermediate19.cpp file, which is contained in either the Cpp8\Chap10 Intermediate19 Project folder or the Cpp8\Chap10 folder. (Depending on your C++ development tool, you may need to open this exercise's project/solution file first.) Modify the program to allow the user to enter the minimum and maximum interest rates, as shown in Figure 10-27. Also change the getBalance function to a void function. Test the program appropriately. Deposit: 1000 Mininum rate (in decimal form): 0.02 Maximum rate (in decimal form): 0.04 Rate 2%: Year 1: $1020.00 Year 2: S1040.40 Year 3: $1061.21 3%; Year 1: $1030.00 Year 2: $1060.90 Year 3: $1092.73 Rate Rate 4%: Year 1: $1040.00 Year 2: $1081,60 Year 3: S1124, 86

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 Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions

Question

Is it clear how the decision was made?

Answered: 1 week ago

Question

Methods of Delivery Guidelines for

Answered: 1 week ago