Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please help! 1. Function Calling Another Function void that function(double& x);

ID: 3684538 • Letter: P

Question

Please help! 1. Function Calling Another Function

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 called inside this_function return x; void that function(double& x) Now, consider the following function that will use 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 Write the complete program to display the resulting discriminant, compile, and run it. Specifically, you shall call bb_4ac () from main and get_a_b_c(a, b, c) from bb_4ac) as shown above, keeping the return types of the functions as shown. Note that the function get_a b c(a, b, c) should read in values from

Explanation / Answer

int main()

{double determinant;

determinant=bb_4ac();

cout<<"the determinant of equation "<<determinant;

double bb_4ac()

{double a,b,c;

get_a_b_c(a,b,c);

return b*b-4*a*c;

}

double get_a_b_c(a,b,c)

{ double a,b,c;

cout<<"enter a,b,c";

cin>>a>>b>>c; /*taking the user input */

return a,b,c;

}