Question: Program in C: Your program will compute compounded interest. Suppose you invest $1000.00 at an interest rate of 2% per year. If the interest is

Program in C:

Your program will compute compounded interest. Suppose you invest $1000.00 at an interest rate of 2% per year. If the interest is computed at the end of each day, it is added to your account (i.e., the interest is compounded daily). Print what the account value will be at the end of each year for 20 years. Use data type double for money. For 365 days per year (ignore leap year), the daily interest rate is 2%/ 365. Your program should request the following numbers as input from the user with scanf():

- Initial account balance (Start with $1000.00)

- Then run and demonstrate it again with the last 6 digits of your ID# so 987123456 would be: 1234.56)

- The annual interest rate in percent

- Number of years: run it for at least 10 years

For a compounding period of 1 (daily), the interest must be computed 365 times and accumulated. For a compounding period of 30 (monthly), the interest would be computed 365/30 or 12 times.Print the amount in the account including accumulated interest for each of 20 years for the following compounding periods if you started with $1,000 dollars:

1. Daily (period 1)

2. Weekly (7)

3. Monthly (30)

4. Quarterly (90)

5. Annually (365)

Use DOUBLE variables for your calculations. Run your program again for daily compounding using FLOAT variables, and note the difference in the results. Output should be formatted in columns, by year number something like this:

Year Daily Weekly Monthly Quarterly Annually ---- ------- ------- ------- --------- --------

0 1000.00 1000.00 1000.00 1000.00 1000.00 1 100x.xx 100x.xx 100x.xx 100x.xx 100x.xx 2 10xx.xx ...

basically how do i set up the formulas for daily/weekly/quarterly/annually where i can use them in a for loop iterating from 0-20.

please list them out below.

do not use any functions or advanced coding because i havent learned them yet and im trying to understand instead of just copy and pasting.

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!