Project: Cubic Roots (Command Line)
Cubic equations of the form Ax3 + Bx2 + Cx + D = 0 have three possible solutions given by the [[Cubic Formula]]. Write a program that accepts the four constants on the command line then prints the three possible solutions.
See: CubicRoots
Output
$ g++ -std=c++17 CubicRootsCmdLine.cpp -o CubicRootsCmdLine -lfmt
$ ./CubicRootsCmdLine 1 -6 11 -6
root #1: 3
root #2: 2
root #3: 1
$ g++ -std=c++17 CubicRootsCmdLine.cpp -o CubicRootsCmdLine -lfmt
$ ./CubicRootsCmdLine 1 -2.2 -6.05 7.986
root #1: 3.3
root #2: 1.1
root #3: -2.2