Set-up and implementation code for a value-returning bool function Equals You are not required to write a complete C++ program but must write and submit just your responses to the four specific function-related questions below:
Set-up and implementation code for a value-returning bool function Equals
You are not required to write a complete C++ program but must write and submit just your responses to the four specific function-related questions below:
QA1: Write the heading for a value-returning bool function called Equals that has two value float parameters, x and y. Document the data flow of the parameters with appropriate comments*.
QA2: Write the function prototype for the function in QA1.
QA3: Write the function definition of the function in QA1 so that it compares x and y, returning true if their difference is less than 0.000000001, and false otherwise.
QA4: Add comments to the function definition* you wrote in QA3 that also states its precondition and postcondition.
Step by step
Solved in 4 steps with 1 images