Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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,

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions