program to solve quadratic and cubic equations