0

cant seem to figure out what the error is :(

```
#include<iostream>
using namespace std;
//prototyping variables
void averageCal(double a[]);
void productCal (double p[]);
void sumCal (double s[]);
int main ()
{
double userinputs [5];//storing the user inputs in a array
for(int i=0; i<5; i++)//suing a for loop to cycly and store the user inputs
{
cout<<"Please enter a value: ";
cin>>userinputs[i];
}//end of for loop for user inputs
//displaying the average,product and sum on screen
cout << "The average of the 5 numbers are: " << averageCal(userinputs[]) << endl;
cout << "The product of the 5 numbers are: " << productCal(userinputs[]) << endl;
cout << "The sum of the 5 numbers are: " << sumCal(userinputs[]) << endl;
return 0;
}
//function for finding the average
void averageCal (double a[])
{
//initialize variables
double addition=0;
double average_ans = 0;
for (int c = 0; c < 5; c++)//for loop to add the numbers
{addition = addition + a[c];}//end of for loop
average_ans = addition / 5;//dividint the numbers by 5
cout << average_ans << endl;
}//end of function
//function for finding the product
void productCal (double p[])
{//initializing variables
double multiplication= 1;
double product_ans= 0;
for (int m = 0; m < 5; m++)//for loop to cycle through the user numbers and multiply them
{multiplication = multiplication * p[m];}//end of for
cout << multiplication << endl;
}
//function fo rfinding the sum
void sumCal (double s[])
{//variables
double addition= 0;
for (int a = 0; a < 5; a++)//for loop
{addition = addition + s[a];}//end of for
cout << addition<< endl;
}
```