subject

When an amount is invested at 5% simple interest, the amount grows by 5%, calculated on the original amount. For example, if $1000 is invested, the amount grows by the same $50 every year. Differently, if an amount is invested at 5% interest compounded annually, the amount at the end of each year is 1.05 times the amount at the beginning of that year. For example, if $1000 is invested, in this case, at the end of the first year, the interest would be $50 and the total amount $1050. At the end of the second year, the interest would be $52.5 and the total amount $1,102.50 and so on. Write a program that allows the user to enter an initial investment amount; it then computes and displays the amounts, for 8 years, for the investment at 5% simple and compound interest. The amounts should be formatted as currency, with 2 decimals. See an example below: While this program can be coded using a For-Next Loop, for this HW you are required to use a Do-While loop. Additionally, your program should contain:
A Function to compute the simple interest
A Function to compute the compound interest
For this program, you do not need to check that the inputs are correct.
YEAR SIMPLE INTEREST COMPOUND INTEREST
1 2100 2205
2 2100 2205
3 2100 2205
4 2100 2205
5 2100 2205
6 2100 2205
7 2100 2205
8 2100 2205

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
Two technicians are discussing the common u-joint. technician a says its input and output speeds should be equal. technician b says that it normally has two yokes. which technician is correct?
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
question
Computers and Technology, 22.06.2019 21:10
Dameas communication challenge is due to which factor
Answers: 2
question
Computers and Technology, 23.06.2019 10:50
The volume v and paper surface area a of a conical paper cup are given by where r is the radius of the base of the cone and h is the height of the cone. a. by eliminating h, obtain the expression for a as a function of r and v. b. create a user-de ned function that accepts r as the only argument and computes a for a given value of v. declare v to be global within the function. c. for v ! 10 in.3 , use the function with the fminbnd function to compute the value of r that minimizes the area a. what is the corresponding value of the height h? investigate the sensitivity of the solution by plotting v versus r. how much can r vary about its optimal value before the area increases 10 percent above its minimum value?
Answers: 1
You know the right answer?
When an amount is invested at 5% simple interest, the amount grows by 5%, calculated on the original...
Questions
question
Mathematics, 06.10.2019 00:30
question
Geography, 06.10.2019 00:30
question
Mathematics, 06.10.2019 00:30
question
Health, 06.10.2019 00:30
question
Mathematics, 06.10.2019 00:30
question
Mathematics, 06.10.2019 00:30
Questions on the website: 13722359