Question: Write a C + + program that reads in a list of double floating point values. Then it reads a query value that it compares

Write a C++ program that reads in a list of double floating point values. Then it reads a query value that it compares to the list of values. The program will print any values from the list that equal the query value. TASK 1: Study the lecture notes (Powerpoint slides and pre-recorded lectures) and assigned readings before you start.
TASK 2: Replace "??" with your name, creation date, and a description of the program (synopsis).
NOTE: DO NOT delete nor change the code already given to you in the code template. You will change the code skeleton as explained in these instructions and the comments within the code skeleton.
TASK 3: Write a C++ function named getInput. The function has two parameters:
An array of double floating point values
The number of valid values in the array
The function prompts the user for the list of positive decimal values to store in the array. You can assume that the user will enter at least one positive decimal value for the list. You do not need to validate any values. The function returns the array and the number of values in the array, but it does not return anything using the return statement.
Add code in the main() function to invoke the getInput function. Compile, run, and test this solution before continuing to the next task.
TASK 4: Write a C++ function called getQueryValue. The function takes no parameters. It prompts the user for the positive decimal query value and returns it. You do not need to validate the query value.
Add code in the main() function to invoke the getQueryValue function. Compile, run, and test this solution before continuing to the next task.
TASK 5: Write a C++ function called printOutput. The function takes the following parameters:
The array of positive decimal values. The function does not change the values in this array.
An integer that represents the number of valid values in the array. The function does not change this value.
A positive decimal value that represents the query value. The function does not change this value.
Using EPSILON, this function prints each value in the list that matches the query value. The function prints a message if no values match.
Add code in the main() function to invoke the printOutput function. Compile, run, and test this solution.
Be sure that there is a comment documenting each variable (see the document on Carmen under Modules on how to comment your code).
Be sure that your code is properly indented, readable, and use good descriptive names.

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 Programming Questions!