Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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

Principles Of Database Systems With Internet And Java Applications

Authors: Greg Riccardi

1st Edition

020161247X, 978-0201612479

Students also viewed these Databases questions