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 : $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 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.
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 : $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 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.
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 20PE: When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making...
Related questions
Question
100%
Hello, I need to solve this problem with C++
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT