Question: Java. Assuming there are no deposits other than the original investment, the balance in a savings account after one year might be calculated as: Amount
Java. Assuming there are no deposits other than the original investment, the balance in a savings account after one year might be calculated as:
Amount = Principal * (1 + Rate/T)T
Principal is the balance in the savings account.
Rate is the interest rate in decimal form. Example: for 4.25% it is 0.0425
T is the number of times the interest is compounded during a year. Example: T is 4 if the interest is compounded quarterly.
Write a program that asks for the principal, the interest rate, and the number of times the interest is compounded (in this particular order, otherwise the code will not pass auto tests in CodeGrade) and then calculates the interest amount. The program echo-prints all the information as well as result of calculations into the screen. See a sample output below. Make sure the order of values in your output is the same as in example. That order is important when passing the CodeGrade auto tests.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
