Write a recursive function that computes and returns the product of the first n? 1 real numbers in an array

What will be an ideal response?

```
// Precondition: anArray is an array of n real numbers, n ? 1.
// Postcondition: Returns the product of the n numbers in
// anArray.
double computeProduct(const double anArray[], int n),
{
if (n == 1)
return anArray[0];
else
return anArray[n - 1] * computeProduct(anArray, n - 1);
} // end computeProduct

```

Computer Science & Information Technology

You might also like to view...

Which of the following display devices do NOT have a problem with screen burn-in?

A. LCD B. CRT C. VGA D. PDP

Computer Science & Information Technology

This is a protocol used to map an IP address to its MAC address.

What will be an ideal response?

Computer Science & Information Technology