Question: Interest Earned Total points: 2 5 Assuming there are no deposits other than the original investment, the balance in a savings account after one year

Interest Earned
Total points: 25
Assuming there are no deposits other than the original investment, the balance in a savings account after one year may be calculated as:
amount = principal **(1+rateT)T
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
Write a program that asks the user for the principal, the interest rate, and the number of times the interest is compounded (3 points).
It then computes the new amount using the above formula (5 points). Hint: Look at slide 4 of CMPS1044_Lect03d_Math_Expressions.pptx for an example of the pow () function.
It then displays interest rate, the times compounded, the principal, the interest, and the current amount in the account. The display should exactly match the output in the screen shot below, with columns aligned (2 points for each display, total 10 points).
Create three string variables, assign them with your name, class and assignment number, and concatenate them along with other characters, such as dashes (-), to display on top (2 points).
Good variable names (3 points).
Proper comments (2 points).
Input
Good variable names (3 points).
Proper comments (2 points).
Input
The input for this program will be two doubles (for principal and the interest rate rate), and one int (for T, the number of times the interest is compounded). The input should be read from the keyboard, as displayed below. Issue appropriate prompts.
Output
The output should be displayed on the screen. It should be formatted as shown below. Use left setw (20) for the string literals, and right
Interest Earned Total points: 2 5 Assuming there

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 Programming Questions!