Question: I'm not sure how to do the calculation. I need amount = principal * (1+rate/t)^t please help! Assuming there are no deposits other than the

I'm not sure how to do the calculation. I need amount = principal * (1+rate/t)^t

I'm not sure how to do the calculation. I need amount =

principal * (1+rate/t)^t please help! Assuming there are no deposits other than

the original investment, the balance in a savings account after one year

may be calculated as: T amount = principal (1 + rate)" Where

please help!

Assuming there are no deposits other than the original investment, the balance in a savings account after one year may be calculated as: T amount = principal (1 + rate)" Where principal = original balance in the account rate = interest rate T= number of times the interest is compounded during a year (T is 4 if the interest is compounded quarterly) Program Requirements: Incorporate the use of good comments Incorporate self-documenting variable names (T is not a good variable name for the number of times the interest is compounded) Variables for principal and the interest rate should be of type double and the number of times the interest is compounded should be of type int Read in the principal, the interest rate, and the number of times the interest is compounded in that order Compute the new amount in the savings account using the above formula o Hint: Look at slide 4 of CS1336_Lect3d_Math_expressions.pptx for an example of the pow () function. Display the interest rate, times compounded principal, interest, and current amount in the account as specified. When the input is as shown in Figure 1, the output should appear as shown in Figure 2. There are 8 dashes on either side of the "Interest Earned" string literal . Output the remaining string literals left-justified in a field width of 20 followed by a space or dollar sign as appropriate (use left 6 #include 7 using namespace std; 8 9 int main() 10 { 12 13 14 15 16 // variable defintions double principal, amount, rate int timesCompounded; //read in data in specified order cin >> principal >> rate >> timesCompunded; //calcuate the amount in the account after one year amount = principal *1 18 19 20 21 22 23 24 25 26 //output cout > principal >> rate >> timesCompunded; 18 19 //calcuate the amount in the account after one year amount = principal | TE //output cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!