Thursday, 15 October 2015

Creating a Quadratic Equation Solver program in JAVA

Here is a simple code written in JAVA to solve quadratic equations even with complex roots.


Description of member Functions:

  • discriminant(double a, double b, double c) - Variable 'a' signifies the coefficient of x^2, 'b' signifies the coefficient of x and 'c' signifies the constant.
  • wait(int n) - Variable 'n' signifies the number of milliseconds to wait before displaying the output. *This function is an extra written to make the program more realistic.
Screens:

Code:



0 comments :

Post a Comment