Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 307 Weeks Ago, 2 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > HR Management Posted 31 Jan 2018 My Price 9.00

quadratic equation

Write a C program using Code::Blocks that determines whether a quadratic equation has one real root, two real roots, or imaginary roots. Then, if the roots are real, display the roots of the quadratic equation. A quadratic equation is of the form ax^2 + bx + c = 0. The discriminant of the equation is D = b^2 - 4ac. If D > 0, then there are two real roots. If D == 0, then there is one real root, and if D < 0, then there are two imaginary roots.

Procedure

1. Include the usual (detailed) comment block including program name, author, date, inputs, outputs and description, followed by your preprocessor directives.

2. After declaring your variables, explain the program to the user by printing a description to the monitor.  

3. Call a function that prompts the user for each of the values of the coefficients a, b, and c for the quadratic equation and returns the value entered, with error checking for a valid input (scanf returned a value).

4. Call a function to calculate the discriminant D.  

5. Use conditional statements to display the type of roots (one real, two real, or imaginary)

6. Depending on the type of roots, use the appropriate form of the quadratic equation to calculate the roots of the equation and display them. For imaginary roots, you will need to calculate the real and imaginary parts separately and print them with the imaginary number i as part of the format.

7. At the end of your program, offer the user the option to run again or exit.

Test Equations  

a) 2x^2+8x+8=0   (One real root -> -2.0)

b) -5x^2+3x-4=0   (Two imaginary roots)

c) -2x^2+7x+4=0   (Two real roots -> -0.5, 4.0)

Answers

(5)
Status NEW Posted 31 Jan 2018 09:01 PM My Price 9.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on-----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be-----------

Not Rated(0)