Question: a. Write a program that reads two numbers from the keyboard representing, respectively, an investment and an interest rate (you will expect the user to

a. Write a program that reads two numbers from the keyboard representing, respectively, an investment and an interest rate (you will expect the user to enter a number such as .065 for the interest rate, representing 6.5% interest rate). Your program should calculate and output (in $ notation) the future value of the investment in 5, 10 and 20 years using the following formula

future value = investment*(1 + interest rate)^year

You will assume that the interest rate is an annual rate and is compounded annually.

b. Write a program that reads a commercial website URL, from the keyboard, you should expect that the URL starts with www. and ends with .com. Retrieve the name of the list and output it. For instance, if the user inputs www.yahoo.com, you should output yahoo.

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!