One type of investment is where you make a single deposit (called the principal) and then let interest add to the balance amount in the account. In this situation, the balance in a savings account may be calculated with this formula: rate nt balance = principal(1+ n where principal is the amount deposited rate is the yearly interest rate as a decimal (for example 0.045 is 4.5%) n is the number of times interest is compounded per year t is the number of years the money is left in the account As an example, if I deposit $450.00 at 1.2% interest, compounded twice a year, then at the end of 6 years, I should have a balance in the account of $483.49. That means my investment earned me $33.49 over the course of six years (not a good investment). Program specifications: Input: your program should ask the user for the amount of principal, the interest rate as a percent (like 1.2), the number of times interest is compounded per year, and the number of years that the investment will last. Output: the output should be in the form shown below. For instance, if the user entered the values in my example, your output would look like: Principal : $450.00 Interest rate : 1.200% Compounding times yearly : 2 Years : 6 Ending balance Amount of interest : $33.49 : $483.49 Additional notes: 1. This program should follow the General Program Format Rules 2. The colons should line up 3. The number of decimal places is important 4. The more the form of your output looks like the example, the better 5. A program that won't even compile is not acceptable! Make sure it runs! I will be running your program and checking it with different values than those of the example. You should do the same to see if it's working correctly.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%
One type of investment is where you make a single deposit (called the
principal) and then let interest add to the balance amount in the account.
In this situation, the balance in a savings account may be calculated with
this formula:
rate
balance = principal(1+
ynt
n
where principal is the amount deposited
rate is the yearly interest rate as a decimal (for example 0.045 is 4.5%)
n is the number of times interest is compounded per year
t is the number of years the money is left in the account
As an example, if I deposit $450.00 at 1.2% interest, compounded twice a year, then at the
end of 6 years, I should have a balance in the account of $483.49. That means my investment
earned me $33.49 over the course of six years (not a good investment).
Program specifications:
Input: your program should ask the user for the amount of principal, the interest rate as a
percent (like 1.2), the number of times interest is compounded per year, and the number of
years that the investment will last.
Output: the output should be in the form shown below. For instance, if the user entered the
values in my example, your output would look like:
Principal : $450.00
Interest rate : 1.200%
Compounding times yearly : 2
Years : 6
.
Ending balance : $483.49
Amount of interest : $33.49
Additional notes:
1. This program should follow the General Program Format Rules
2. The colons should line up
3. The number of decimal places is important
The more the form of your output looks like the example, the better
5. A program that won't even compile is not acceptable! Make sure it runs!
4.
I will be running your program and checking it with different values than those of the example.
You should do the same to see if it's working correctly.
Transcribed Image Text:One type of investment is where you make a single deposit (called the principal) and then let interest add to the balance amount in the account. In this situation, the balance in a savings account may be calculated with this formula: rate balance = principal(1+ ynt n where principal is the amount deposited rate is the yearly interest rate as a decimal (for example 0.045 is 4.5%) n is the number of times interest is compounded per year t is the number of years the money is left in the account As an example, if I deposit $450.00 at 1.2% interest, compounded twice a year, then at the end of 6 years, I should have a balance in the account of $483.49. That means my investment earned me $33.49 over the course of six years (not a good investment). Program specifications: Input: your program should ask the user for the amount of principal, the interest rate as a percent (like 1.2), the number of times interest is compounded per year, and the number of years that the investment will last. Output: the output should be in the form shown below. For instance, if the user entered the values in my example, your output would look like: Principal : $450.00 Interest rate : 1.200% Compounding times yearly : 2 Years : 6 . Ending balance : $483.49 Amount of interest : $33.49 Additional notes: 1. This program should follow the General Program Format Rules 2. The colons should line up 3. The number of decimal places is important The more the form of your output looks like the example, the better 5. A program that won't even compile is not acceptable! Make sure it runs! 4. I will be running your program and checking it with different values than those of the example. You should do the same to see if it's working correctly.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY