Question: Create a function called compareDelta() that takes three parameters all doubles. The first two are the numbers to compare. The last parameter is the delta.

Create a function called compareDelta() that takes three parameters all doubles. The first two are the numbers to compare. The last parameter is the delta. It returns a true if the two parameters lays between the plus/minus of delta parameter.

Using C++

Example 1: Number1: 1.205 Number2: 1.305 Delta: 0.100 This set of numbers would return a true.

Example 2: Number1: 1.3058 Number2: 1.3059 Delta: 0.00001 This set of numbers would return a false.

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!