subject

It will take in three inputs: a, b, and c. It will return the roots of the calculation. ax^2+ bx+c= 0 , x= - b± √ b^2-4ac/2a

It will take in three inputs: a, b, and c. It will return the roots of the calculation. It will also have a function, haveImaginaryRoots, that will take in the inputs a, b, and c and return bool, using the formula: b2 – 4ac. If the result is < 0, it has imaginary roots. Otherwise, all the roots are real. If you get imaginary roots, you will have to add ‘i' to the end. se the library for pow and sqrt

Here's a sample run:

Enter a: 1
Enter b: -3
Enter c: 2
The roots are 1 and 2.

Do you want to continue (Y/N)? Y

Enter a: 1
Enter b: 0
Enter c: 9
The roots are 3i and -3i.
Do you want to continue (Y/N)? N

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 20:10
Leo is a recruitment executive for a large company. he has identified new labor resource requirements in both the marketing and production departments. what should be his first step in recruiting candidates for the positions? a. conduct background checks of candidates b. make job offers c. arrange interviews d. conduct reference checks e. place job ads on job sites
Answers: 1
question
Computers and Technology, 25.06.2019 02:30
How to delete a question in
Answers: 2
question
Computers and Technology, 25.06.2019 04:00
Has anyone noticed that has been giving the wrong answers and that the ads are blocking answers or is that just me?
Answers: 2
question
Computers and Technology, 25.06.2019 10:30
Why does the hp computer not have bluetooth?
Answers: 1
You know the right answer?
It will take in three inputs: a, b, and c. It will return the roots of the calculation. ax^2+ bx+c=...
Questions
question
Chemistry, 18.03.2021 01:30
question
Mathematics, 18.03.2021 01:30
question
Arts, 18.03.2021 01:30
question
Mathematics, 18.03.2021 01:30
Questions on the website: 13722363