Extra Credit #3

Due: February 6, 2012Points: 30

For this homework, please put refinements for all your programs into one file called “refinements.txt” or “refinements.pdf”, and error journal entries for all your programs into one file called “errors.txt” or “errors.pdf”.

Submit this program in the Extra Credit 3 area of SmartSite—not in the Homework 3 area.

Extra Credit: (30 points) Recall the formula for the solutions to a quadratic equation y = ax2 + bx + c is:

First quadratic root
and
Second quadratic root
Write a program that reads in a, b, and c, checks that they are numbers, checks that b2−4ac is non-negative, and then computes the two roots. If any of the inputs are not numbers, or b2−4ac is negative, report an error and stop.
A PDF version is available here.
ECS 10, Basic Concepts of Computing
Winter Quarter 2012