Maximum and Minimum value of a quadratic function | Function to print the Maximum and Minimum values of the quadratic function ; Calculate the value of second part ; Print the values ; Open upward parabola function ; Open downward parabola function ; If a = 0 then it is not a quadratic function ; Driver Code
function PrintMaxMinValue ( a , b , c ) { var secondPart = c * 1.0 - ( b * b / ( 4.0 * a ) ) ; if ( a > 0 ) { document . write ( " " + " " + " " ) ; document . write ( " " + secondPart ) ; } else if ( a < 0 ) { document . write ( " " + secondPart + " " ) ; document . write ( " " + " " ) ; } else { document . write ( " " ) ; } } var a = - 1 , b = 3 , c = - 2 ; PrintMaxMinValue ( a , b , c ) ;