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 10:30
Choose the best explanation for the following statement communication is symbolic
Answers: 3
question
Computers and Technology, 22.06.2019 21:00
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings starting from index 0. for each match, add one point to userscore. upon a mismatch, exit the loop using a break statement. assume simonpattern and userpattern are always the same length. ex: the following patterns yield a userscore of 4: simonpattern: rrgbryybgy userpattern: rrgbbrybgy
Answers: 2
question
Computers and Technology, 23.06.2019 04:00
In a word processing program, such as microsoft word, which feature to you choose the desired picture enhancement?
Answers: 2
question
Computers and Technology, 24.06.2019 16:00
How are roger williams, james oglethorpe, and william penn similar?
Answers: 3
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, 05.03.2021 21:00
question
Mathematics, 05.03.2021 21:00
question
Spanish, 05.03.2021 21:00