Where do I enter the amounts for the savings accounts and years? Write a program
ID: 3653480 • Letter: W
Question
Where do I enter the amounts for the savings accounts and years? Write a program that calculates savings accounts yearly savings accounts amount. The savings account pay an interest rate of 5% yearly if the amount saved is at least $500 and they are saving for at least 5 years, otherwise the interest is 3%. Your program should ask the user how much money they are saving and how many years they are saving for. You will output the initial amount saved and the amount they will have in the account at the end of each year. Example: Welcome to XYZ Bank! How much money are you putting into your savings account? 300 How many years will you be saving for? 4 Initial amount: $300 At the end of year 1: $309 At the end of year 2: $318.27 At the end of year 3: $327.82 At the end of year 4: $337.65 This is just an example. The user can put in any amount and they can save for any number of yearsExplanation / Answer
/in cpp (c++) #include #include using namespace std; int main(){ //declare variables int rate; double SavingAmount; int years; double balance; //SavingAmount and year from user coutSavingAmount; coutyears; if(SavingAmount>=500 && years>=5) rate=5; else rate=3; balance= SavingAmount; //output year (still initial value) coutRelated 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.