Can someone help me with this program Modify the savings acc


Can someone help me with this program
Modify the savings account program from Figure 9-18 in Chapter 9. Follow the instructions for starting C++ and viewing the Intermediate 19.cpp file, which is contained in either the Cpp8\\Chap10\\Intermediatel9 Project folder or the Cpp8\\Chapl0 folder. (Depending on your C++ development tool, you may need to open this exercises 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 Minimum rate (in decimal form): 0.02 Maximum rate (in decimal form): 0.04 Rate 2%: Year 1: $1020.00 Year 2: $1040.40 Year 3: $1061.21 Rate 3%: Year 1: $1030.00 Year 2: $1060.90 Year 3: $1092.73 Rate 4%: Year 1: $1040.00 Year 2: S1081.60 Year 3: $1124.86

Solution

#include <iostream>
void getBalance(float);
/* run this program using the console pauser or add your own getch, system(\"pause\") or input loop */
using namespace std;
int main(int argc, char** argv) {
   float balance =0.0,min,max,deposit=0;
   int a,b;
   int i;
  
   cout << \"DEPOSIT:\\t\" ;
   cin >> balance;
   deposit =balance;
   cout << \"MINIMUM interest rate(in decimal form):\\t\";
   cin >> min;
   cout << \"MAXIMUM interest rate(in decimal form):\\t\";
   cin >> max;
   a = ((max*100) - (min * 100))+1;
   for(b=1;b<=a;b++){
      
       switch(b){
       case 1:cout << \"Rate \"<< b << \"%:\" << \"\ \";
           for(i=1;i<=3;i++){
               balance = balance + (balance *(min)) ;
               cout << \"\\t\\tYear\"<< i <<\":\\t\" << balance << \"\ \";
           }
           break;
       case 2:cout << \"Rate \"<< b << \"%:\" << \"\ \";
           min = min + 0.01;
           balance = deposit;
           for(i=1;i<=3;i++){
               balance = balance + (balance *(min)) ;
               cout << \"\\t\\tYear\"<< i <<\":\\t\" << balance << \"\ \";
           }
           break;
       case 3:cout << \"Rate \"<< b << \"%:\" << \"\ \";
       balance = deposit;
           for(i=1;i<=3;i++){
               balance = balance + (balance *(max)) ;
               cout << \"\\t\\tYear\"<< i <<\":\\t\" << balance << \"\ \";
           }
           break;
       }
   }
   cout << \"Initial deposited amount =\" ;getBalance(deposit) ;
   return 0;
}
void getBalance(float deposit){
   cout << deposit;
}

 Can someone help me with this program Modify the savings account program from Figure 9-18 in Chapter 9. Follow the instructions for starting C++ and viewing th
 Can someone help me with this program Modify the savings account program from Figure 9-18 in Chapter 9. Follow the instructions for starting C++ and viewing th

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site