You decide to put some money in a bank in an interest freeaccount. The bank deci
ID: 3615716 • Letter: Y
Question
You decide to put some money in a bank in an interest freeaccount.
The bank decides to charge 2% of the amount as service chargesper year.
The bank will close your account when the amount becomes lessthan 1500 AED. Write a program that accepts the amount you want tosave in the bank and prints for you the depreciation (decrease) inyour savings every year because of only the bank charges.
The program should also tell you in how many years will youraccount be closed because its balance will go below 1500 AED.
Explanation / Answer
#include<iostream.h> int main() { int bal, v; float chr=0; cout<<"Enter your balance you want tosave in bank"; cin>>bal; int abal=bal; int year=0; while(abal>=1500) { chr=0.02*abal; abal=abal-chr; year++; } cout<<"Bank will close your accontin"<<year+1<<" as your balance will godown to 1500AED"; getch(); retrun 0; } Hope you find it helpfulRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.