Back to DFS's Workshop Page
Back to Agenda Page
Quadratic Equation Problem I
Hardset Variables
For this problem, you are to cannibalize any available code and write a PHP script which will do the following. Using the quadratic formula, solve the equation Ax2 + Bx + C = 0.
- Introduce the program to the user
- Hardset the coefficients, e.g., $a = 1;
- Calculate the value of the discriminant
- Checking the discriminant, calculate the root(s) and print the results
Use your pseudocode as your documentation comments.
© 2007 DFStermole
Created 16 Nov 07
Last Modified 16 Nov 07