UCL Logo
Child pages
  • quadratic_equation.f90
Skip to end of metadata
Go to start of metadata

The following program calculates and prints the roots of a quadratic equation.

 Exercise: compile and execute the program, test the results for different values
 of input coefficients, does it always produce correct numbers?

  1. Select values which do not work and use debugger to find the cause of the run-time error by making the program stop at different locations in the source code and checking the values of the variables.
  2. Modify program to trap the error. Hint: Use IF
  3. Modify program to compute more general solution. Hint: Use appropriate KIND.



  • No labels