void that_function(double& x );
double this_function( ); //This function can
now call that function
int main( )
{
double y;
....
....
y = this_function( );
....
return 0;
}
double this_function( )
{
double x;
....
....
that_function(x
); // that function is
being called inside this function
return x;
}
void that_function(double& x )
{
....
....
}
Exercise 6.4
Consider the following function that uses a, b, and c as the coefficients
of a quadratic equation to compute b2 - 4ac.
This function calls on another function called get_a_b_c to get
the values for a, b, and c.
double bb_4ac( )
{
double a, b, c; //
Coefficients of a quadratic equation
get_a_b_c(a, b, c);
return b*b - 4*a*c;
}
Complete the program by writing the main function (sometimes also called the "driver" function) that calls the above function. Compile it and run it.