Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do in C not C++ Write a program that prompts the user to enter the coefficients a,b and c from the quadratic equation ax^2+bx+c-0,

Please do in C not C++image text in transcribed

Write a program that prompts the user to enter the coefficients a,b and c from the quadratic equation ax^2+bx+c-0, and calculate the roots of the equation. Depending on the value of b^2-4ac (known by the discriminant), your program displays the rootfs) of the given quadratic equation. Here are some sample runs: Sample Run 1:(The user's entry is in bold Enter your the coefficients a b and c separated by space: 11 1 Your quadratic equation has two complex roots:-0.5 +i0.87 and-0.5-i0.87 Goodbye! Sample Run 2: (The user's entry is in bold) Enter your the coefficients a b and c separated by space: 1 Your quadratic equation has one real repeated root: -1 Goodbye! 2 1 Sample Run 3: (The user's entry is in bold) Enter your the coefficients a b and c separated by space: 0 Sorry the first coefficient can't be 0! Goodbye! 2 1

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

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions

Question

Define classism and levels of classism

Answered: 1 week ago