I am currently stuck at this problem assigned to me below.
Write a complete C++ program that consists of a main program and a function
solve_quadratic_equation that will find solution for a quadratic equation. Your function
will need to handle all possible exceptions that can occur with different values of a, b, and c. The
function returns false for complex solution else true for all others. Your function must
demonstrate call by value (a, b, c) and call by reference (x1, x2) formal parameters.
Here's my current code so far:
#include <iostream>
#include <cmath>
void x1(float a, float b, float c);
void x2(float a, float b, float c);
using namespace std;
int main()
{
int a, b, c;
double x1, x2;
Write a complete C++ program that consists of a main program and a functionsolve_quadratic_equation that will find solution for a quadratic equation. Your function will need to handle all possible exceptions that can occur with different values of a, b, and c. The function returns false for complex solution else true for all others. Your function must demonstrate call by value (a, b, c) and call by reference (x1, x2) formal parameters.