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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started