This C program solves cubic equations of the form ( ax^3 + bx^2 + cx + d = 0 ). Developed during my programming course, the program computes the roots, which may be real or complex.
- Input coefficients ( a ), ( b ), and ( c ) for the cubic equation.
- Calculate and display the roots of the equation.
- Handle cases for distinct real roots, repeated roots, and complex roots.
- C programming language
To compile and run the program, follow these steps:
- Clone the ropository:
git clone https://github.com/NVDIV/CubicEquation.git- Navigate to the project directory:
cd CubicEquation- Compile the program:
gcc -o cubic cubic.c- Run the program:
./cubicEnter the coefficients π, π and π when prompted. The program will calculate and display the roots of the cubic equation..
If youβd like to reach out, feel free to connect with me:
Thanks for visiting!