Write a stub for the following function prototype:
```
double root( double a, double b, double c, int i);
// Precondition: a != 0 and a, b, c are coefficients of
// a quadratic equation a*x*x + b*x + c = 0 The value
// of i is either +1 or -1 to choose which root.
// Postcondition: return value, x, satisfies the
// equation a*x*x + b*x + c = 0
```
```
#include
// stub functions example
double root(double a, double b, double c, int i)
{
using namespace std;
cout << "executing function\n"
<< "double root(double, double, double)"
<< endl;
return 2.0;
}
```
You might also like to view...
Which tool enables you to create a video of what happens on your computer screen?
a.Machinima b.Screen capture software c.Streaming d.Webcam
Which of the following is a double-selection control statement?
a. do...while b. for c. if...else d. if