Computers and Technology

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

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 00:00, dubouuu
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
image
Computers and Technology, 23.06.2019 05:00, bellad0124outlookcom
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
image
Computers and Technology, 23.06.2019 10:00, serenityharmon1
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
image
Computers and Technology, 24.06.2019 12:30, tragicteekaay
Nikki sent flyers in the mail to all houses within the city limits promoting her computer repair service what type of promotion is this and example of
Answers: 1
Do you know the correct answer?
It will take in three inputs: a, b, and c. It will return the roots of the calculation. ax^2+ bx+c=...

Questions in other subjects: