Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The real roots of the quadratic equation a x 2 + b x + c = 0 are given by the formula ( assuming that

The real roots of the quadratic equation ax2+bx+c=0 are given by the formula (assuming that (:b2-4ac0} :
x=-b+-b2-4ac22a
There are no real roots for the case b2-4ac0.
Draw a flowchart that represents a solution to the following problem:
Prompt the user for the coefficent of a,b, and c. You may assume that the coefficient a the user enters is always nonzero, a0.
Print the real roots for the quadratic equation, if they exist; otherwise print the message "no real roots".
There is more than one way to solve this problem. In general, compact solutions that are easy to understand (in other words, not so compact as to be cryptic) are better than long-winded solutions. Spend some time thinking about designing not just a solution that works, but a solution that is compact and easy to understand.
Your flowchart doesn't need to use syntactically-correct C code, it just needs to be clear and unambiguous to the reader so that they could program the algorithm in C. If you're unsure, be more precise.
Note: There is no +-(plus/minus) operator in C so you must compute the two roots in separate calculations, assuming they exist.
To submit an answer to this question, draw your flowchart on your computer or paper. Then export/save it as a JPG file (or snap a clear, high-resolution photo with your phone) named "roots.jpg"(exactly) and upload your "roots.jpg" file here. Finally, click on the Save button below.
It is your responsibility to ensure the file you submit is a true JPG file. Click the "Show preview" button after submitting, to confirm you can see the image. There are various tools you can use to produce a JPG file on your device, such as:
Your phone camera most likely stores photos as JPG files;
app.diagrams.net lets you draw a flowchart and save it as a JPG;
Punchi.me converts various image formats to JPG; and
image text in transcribed

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

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions