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;
```

Computer Science & Information Technology

You might also like to view...

What is another name for a parent class?

A. Bob B. base class C. derived class D. sub class

Computer Science & Information Technology

What option, when passed to the shutdown command, will restart the local computer?

A. /h B. -h C. /s D. /r

Computer Science & Information Technology

A single high-level language instruction is typically translated into many high-level language instructions. _________________________

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

What is the role of an Inter-Site Topology Generator (ISTG)?

What will be an ideal response?

Computer Science & Information Technology