Question: Indent 2-4 spaces (optimally 3) within main. The editor should take care of proper indenting. Place no more than one C statement per line. Do

 Indent 2-4 spaces (optimally 3) within main. The editor should take

Indent 2-4 spaces (optimally 3) within main. The editor should take care of proper indenting. Place no more than one C statement per line. Do not type more than 80 characters per line. In if-else statements, indent statements to be executed for if or else conditions three to five spaces. Align else or else if with corresponding if If functions are required, be sure to include a purpose statement before each function. Quadratic Equation Solver: Write a program to compute the real roots of a quadratic equation in the form ax+bx c Your program should prompt the user to enter the constants (a, b, and c) as floating point numbers. I is then to display the roots based on the following rules: a If both a and b are zero, print that there is no solution. b. If a is zero (and b is non-zero), there is only one root ( c/b). It should be calculated and printed with three decimal places. there are no real roots. should be calculated from the formulas below and c If the discriminant (b2-4ac) is negative, print that d. For all other combinations there are two roots, which printed with three decimal places. Find a way to do this program that uses if structures other than just simple if. Run your program with the following data Set 1: a-3.0; b-8.0; c 5.0; Set 2: a-6.0; b-7.0; c-8.0; Set 3: a-0.0; b-9.0; c-10.0 Set 4: a -0.0; b 0.0; c-11.0; Submit a screen capture for each of these runs

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