Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Help! I\'m a little stuck on this problem: Write a C++ program that allows a use

ID: 646019 • Letter: H

Question

Help! I'm a little stuck on this problem:

Write a C++ program that allows a user to enter an amount of money to be placed into savings EACH year, the number of years the savings will take place at the interest rate (as a decimal) that the savings plan gives. Use a function name cakculate() to computer the final amount of money in the savings account if the principal is compounded annually. Finally, main() should output the amount of money int he savings account.

Prompts would be

Enter the amount of money to be deposited each year...

Input the number of years to run the program for...

Input the interest rate you are getting at this bank

The amount of money in your savings account is now.....

Thank you :~)

Explanation / Answer

#include<stdio.h>
#include<math.h>

using namespace account

public class Interest
{
    public double calculate()
    {
    float amt,rate,tot;
    int year;
    cout>>"Enter the amount of money to be deposited each year...";
    cin<<amt;
    cout>>"Input the number of years to run the program for...";
    cin<<year;
    cout>>"Input the interest rate you are getting at this bank";
    cin<<rate;
    tot= amt ( 1 + rate/1 )pow(1*year);
    }

void main()
{
float amount;
amount=calculate();
cout>>"The amount of money in your savings account is now:"<<amount;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote