Skip to main content
Lesson 9 - while Loops
Lesson MenuPrevious
  
L.A.5.2 - Quadratic page 10 of 10

Assignment:

  1. Write a program to input the coefficients of a, b, and c for a quadratic equation. Remember that a quadratic equation can be summarized in the form:

    The program should compute the two roots for the equation.

  2. Your two answers should be printed out to 4 decimal places, + 0.0001.

  3. You do not have to error-trap for a negative determinate situation (if b2 - 4ac < 0). All the test inputs will result in real-number answers.


Instructions:

  1. Write your program, test it, and then run these 3 sample inputs:

  2. Here are decimal equivalencies to use for inputs to the middle problem:

  3. Turn in your source code and run output.


Lesson MenuPrevious
Contact
 ©ICT 2003, All Rights Reserved.