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...
The ________ attribute limits the number of characters that a user can type in a text field
Fill in the blank(s) with correct word
The ________ must be the same in all IPv6 addresses inside a small enterprise
A) Global routing prefix B) Subnet C) Interface ID D) Host field
In file hashing, a file is read by a special algorithm that uses the value of the bits in the file to compute a single number called the __________ value.
A. result B. smashing C. hash D. code
Discuss the three generations of DBMSs.
What will be an ideal response?