Quadratic Solver is an efficient, easy-to-use command-line application designed for solving quadratic equations. It's built for students, educators, and anyone with a need to find roots of quadratic equations quickly. By providing a streamlined process for calculating and displaying solutions, this C program helps demystify quadratic equations for educational and practical purposes.
- GCC compiler
- Make (optional for ease of compilation)
- Clone the repository:
git clone https://github.com/Wal33D/Quadratic-Solver.git
- Navigate to the project directory:
cd Quadratic-Solver
- Compile the program using the provided Makefile:
make
Or manually compile:
gcc -o solveQuad main.c discriminant.c input.c output.c quadSolver.c root.c -lm
After compilation, run the program:
./solveQuad
Follow the prompts to enter coefficients (a, b, and c) for your quadratic equation.
- Real-time Solutions: Calculates roots for any given quadratic equation instantly.
- Simplicity: Command-line interface for straightforward interaction.
- Educational Value: Great for learning and teaching the fundamentals of quadratic equations.
The Makefile is configured to compile all necessary files and link the math library using -lm
. No further configuration is needed.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a feature branch.
- Commit and push your changes.
- Make a pull request.
This project is open-sourced under the MIT License.
Solves the quadratic equation to a 10E-7 degree of precision. Problem Statement
Given a quadratic equation as follows:
if bb-4a*c is non-negative, the roots of the equation can be solved with the following formulae: