Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Publishing With Filemaker Pro On The Web

Authors: Maria Langer

1st Edition

0201696657, 978-0201696653

More Books

Students also viewed these Databases questions

Question

Define Administration?

Answered: 1 week ago