Solve the problem in C++
(Financial application: compute the future investment value)
Write a function that computes future investment value at a given interest rate for a specified number of years. The future investment is determined using the formula in
Use the following function header:
double futureInvestmentValue(
double investmentAmount, double monthlyInterestRate, int years)
For example,
futureInvestmentValue(10000, 0.05/12, 5) returns 12833.59.
Write a test program that prompts the user to enter the investment amount (e.g., 1000) and the interest rate (e.g., 9%) and prints a table that displays future value for the years from 1 to 30, as shown below:
The amount invested: 1000
Annual interest rate: 9
Years Future Value
1 1093.80
2 1196.41
...
29 13467.25
30 14730.57
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 2 images
- need help with c++arrow_forwardEmployee Salary Calculator Program and Analysis Demonstrate an understanding of C++ programming concepts by completing the following: Program: Create a C++ program that will function as an Employee Salary Calculator. Obtain from the user: Double variables for Standard Hours worked Rate of Pay Overtime Hours (if applicable) Calculate appropriate pay for standard hours and overtime (1.5 x rate of pay). Provide formatted output using the following methods setw() setprecision() Store the values into three different variables. For each double variable, create a double pointer to dynamic memory. Display the contents of the variables and pointers. In your program, be sure to use the new operator and delete operators to manage dynamic memory. Program Analysis: Given your program implementation, discuss and identify the possible security vulnerabilities that may exist. If present, discuss solutions to minimize the vulnerabilities. Discuss and identify possible problems that can result…arrow_forwardC++ HELP! Please help, this question was rejected for complexity but I really don't have any one else to ask! I would really like to see what I got wrong so if anyone can solve this please help!Write a complete C++ program with the following: A struct named Car with member variables to store car make, model, and price. A function named setCar that returns a Car and has no parameters. setCar will:prompt the user for a car name, model, and price, and return that car. A void function named showCars with 2 parameters: a constant Car array named cars, and a constant integer named SIZE. The showCars function will:Use a loop to display the make, model, and price of each car in the cars array, and will also display what that car’s position is in the array (for regular computer users who start counting from 1, not programmers who start counting from 0). In the main functionDeclare a constant integer named SIZE with the value of 3.Declare a Car array the size of SIZE. Write a loop to call your…arrow_forward
- CODE IN C PLEASE AND POST THE CODE WITH TEXTarrow_forwardWrite a complete C++ program that helps the teacher to calculate the result of students in the test of Programming Technique. The program should perform the following tasks: Task 1: Write a function named getInput. a) This is a non-returning function. b) It takes the score of question 1, score of question 2, and score of question 3 as input parameters. c) The function should ask the user to enter the score (per 100) for each question. It sends all the values entered by the user in (c) back to the calling module through the use of reference parameters. d)arrow_forward2. Safir Market wants you to create a simple python program for calculating Total cost and change for their customers. The program should start by reading price, articles and Money. Then you need to do the following: • Create a void function that will display "Safir Market" • Create a function with return value and with parameters that will compute Total cost as product of articles and price • Create a function that will accept the computed Total cost as a parameter and will compute the change. If the Total cost is more than or equal to Money, the balance is to be calculated as Money - Total cost, otherwise print the message 'Money not enough' • Display the output as shown below, Sample output Enter the price: 345 Enter number of articles: 4 Enter Money: 65 -Safir Market Total cost is: 1380.0 Money not enough Change is: Nonearrow_forward
- Write the following in C++arrow_forward*You need to have at least one user define function *Language: C programming Write a C Program to print half pyramid using numbers shown below. This example is for height 6. Ask user for a height and depending on user input, draw the half pyramid. Input: Key in the height: 6 Output: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 5 6arrow_forwardPython Help Write a function rectangle_area(length, width)Write a function rectangle_perimeter(length, width)Write a function circle_area(radius)Write a function circle_circumference(radius)Write a main function that asks the user to choose whether to find the area of a rectangle, the perimeter of a rectangle, the area of a circle or the circumference of a circle. If the user chooses to find the area of a circle use circle_area function, if the user chooses to find the area of a rectangle use rectangle_area function and so on.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education