Question: Task2 Write a function findNumbers that receives the product, of type double, of two positive numbers x and y (product x y) ad the sum,

 Task2 Write a function findNumbers that receives the product, of type

Task2 Write a function findNumbers that receives the product, of type double, of two positive numbers x and y (product x y) ad the sum, of type double, of those two numbers (sum x + y), it then finds and retrns the two numbers x and y, each of type double. Write an interactive main function to test your findNumbers function. Your program must display an error message and terminate it any of the inputs is zero or negative Note: . Substitute y-sum-x in the product eq to get the quadratic equation to be * Usc valid product, sum pairs for your Hint: You will be solving a quadratic equation solved for x and v input [sum-4 *product0] of the form; axbx +0 Use the larger root for your solution: Sample program runs Enter the product and sum of two numbers: 8.0 6.0 numi4.000000, num2 2.000000 Enter the product and sum of two numbers: 16.1 8.1 num! 4, 600000, num2 3.500000 Enter the product and sum of two numbers: 1.35 3.20 numi2.700000, num2 0.500000

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!