Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program invest.cpp which computes the value of an investment after a certain number of years at a certain interest rate. 1. Type emacs

Write a program invest.cpp which computes the value of an investment after a certain number of years at a certain interest rate. 1. Type emacs invest.cpp & (without the double quotes) at the terminal to create a new file, invest.cpp. 2. Prompt and read in the initial investment (type integer). 3. Prompt and read in the interest rate (type integer). 4. Prompt and read in the number of quarters (type integer). 5. Compute the final value of the investment compounded annually as: x * (1 + (R/100))Y where x is the initial investment, R is the interest rate, and Y is the number of years. Use the C++ function pow to compute (1 + (R/100))Y . Note that you will compute the investment value in years. Thus, you will need to convert the number of quarters to number of years. There are four quarters in a year. 6. Compute the profit from the investment as: profit = (final investment) (initial investment) 7. Output: Value of your investment compounded yearly after Y year(s) is D dollars. Profit from your investment after Y year(s) is P dollars. where Y is the number of years, D is the final value of the investment, and P is the profit 8. Compute the final value of the investment continuously compounded as: x * e (R/100)Y where e is Eulers number and equal to 2.71828. 9. Output: Value of your same investment but continuously compounded is D dollars. Profit from this investment is P dollars. The difference between both investment types is F dollars. where D is the final value of the investment, P is the profit, and F is the difference of the profits between both investment types.

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

Strategic Database Technology Management For The Year 2000

Authors: Alan Simon

1st Edition

155860264X, 978-1558602649

More Books

Students also viewed these Databases questions

Question

6. Discuss the steps involved in conducting a task analysis.

Answered: 1 week ago

Question

8. Explain competency models and the process used to develop them.

Answered: 1 week ago