Write the definition of a function named quadratic that receives three double parameters a,b,c. If the value of a is 0 then the function prints the message “no solution for a=0” and returns. If the value of “b squared” – 4ac is negative, then the code prints out the message “no real solutions” and returns. Otherwise the function prints out the largest solution to the quadratic equation. The formula for the solutions to this equation can be found here: Quadratic Equation of Wikipedia.

Write the definition of a function named quadratic that receives three double parameters a,b,c.  If the value of a is 0 then the function prints the message “no solution for a=0” and returns.  If the value of “b squared” – 4ac is negative, then the code prints out the message “no real solutions” and returns.  Otherwise the function prints out the largest solution to the quadratic equation.  The formula for the solutions to this equation can be found here:  Quadratic Equation of Wikipedia.

LANGUAGE: Visual Basic

CHALLENGE: Write the definition of a function named quadratic that receives three double parameters a,b,c.  
If the value of a is 0 then the function prints the message “no solution for a=0” and returns.  
If the value of “b squared” – 4ac is negative, then the code prints out the message “no real solutions” and returns.  
Otherwise the function prints out the largest solution to the quadratic equation.  

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days – Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level