#include using namespace std;int main() {//class declaration and definition of Bankaccount"double balance, interest, rate;"int year;"cout" cin >> balance;cout cin >> year;cout if (balance "rate =...


#include

using namespace std;





int main() {






//class declaration and definition of Bankaccount





"double balance, interest, rate;"

int year;





"cout" < "enter="" initial="" bank="" balance:="">

cin >> balance;





cout < "what="" are="" the="" estimated="" years="" you="" plan="" to="" maintain="" your="" initial="" balance:="">

cin >> year;





cout < "="" \n***bank="" balance="" interest="">





if (balance < 30000)="">

"rate = 0.02;"

}





"else if (balance < 50000)"="">

"rate = 0.03;"

}





"else if (balance < 80000)"="">

"rate = 0.04;"

}





else {

rate = 0.05;

}





interest = balance * rate;

balance = balance + interest;





"cout" < "setiosflags"("ios::fixed"="" |="" "ios::showpoint")=""><>

"cout" < ""after="" 1="" year,="" $""="">< "balance"="">< "="" at="" an="" interest="" rate="" of="" "="">< rate=""><>





"for (int i = 2; i <= year;="" i++)"="">

"interest = balance * rate;"

"balance" = "balance" + "interest";"

"cout" < "after="" "="">< i="">< "="" years,="" $"="">< "balance"="">< "="" at="" an="" interest="" rate="" of="" "="">< rate=""><>

}





return0;

}











Oct 25, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here