Back to DFS's Workshop Page
Back to Agenda Page


Quadratic Equation Problem I

Command Line Arguments

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.

  1. Introduce the program to the user
  2. Get the coefficients from the Command Line
  3. Calculate the value of the discriminant
  4. Checking the discriminant, calculate the root(s) and print the results

© 2005 DFStermole
Created 30 Oct 05
Last Modified 30 Oct 05