Write a C++ function named quadratic which has parameters a,b, and c of type int which calculates only double?
Write a C++ function named quadratic which has parameters a,b, and c of type int which calculates only double real roots of quadratic equations according to the formula:
The two real roots are passed back to the caller via two parameters r1 and r2 of type float. When quadratic cannot calculate two real roots, it prints out the appropriate error message and returns -1 to the caller as a warning not to use the values of the roots. When it can calculate two real solutions, it returns 1 to the caller to indicate success.
That's not a function, that's an entire program. But, it doesn't declare a return type for main or have a return statement. And it's written in C on a C++ board. :p