Question: programming language C Write a program that will calculate the amount of money in a bank account at four different periods of time given a

programming language C

programming language C Write a program that will calculate the amount of

Write a program that will calculate the amount of money in a bank account at four different periods of time given a starting amount of money and an interest rate that is entered by the user Your program should: Prompt the user to enter the Principal (P) that is used to start the account. Read this value from the user. Prompt the user to enter the annual interest rate (r) that is used to start the account. Read this value from the user. Using a random number generator, seeded with time, generate four numbers to represent the amount of time, (use t1, 12, t3, t4), in years that the money is invested. The generator should generate values for time between 1 year and 20 years Use the formula below to calculate the amount of money, A, in the account after the four periods of time ti, t2, t3, t4) given the Principal (P) and annual interest rate (r) supplied by the user. A Pert print the results in a table with two columns (Time and Amount) with a label at the top of each column. Test your program with: P $2000 r 5% (Note: and convert the number to 0.05 by applying an appropriate factor in the formula, 5% will be converted to 005, For the program, read in 5 from the user

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!