Question: Write a program that prompts the user to input the value of a ( the coefficient of x 2 ) , b ( the coefficient

Write a program that prompts the user to input the value of a (the coefficient of x 2), b (the coefficient of x), and c (the constant term), and outputs the type of roots of the equation. Furthermore, if b 24ac 0, the program should output the roots of the quadratic equation.
I need the program to prompt up in a cmd window and ask for the coefficent of the square
then ask for the coefficient of x
then asks for the constant term
at the end of the prompt it needs to say "The equation has complex roots"

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 Programming Questions!