Answer:
The method in C++ is as follows:
double average(int v, int w, int x, int y, int y){
double ave = (v+w+x+y+z)/5.0;
return ave;
}
Step-by-step explanation:
This defines the average method with 5 parameters
double average(int v, int w, int x, int y, int y){
This calculates the average
double ave = (v+w+x+y+z)/5.0;
This returns the calculated average
return ave;
}
To call the method from the program's main, use:
int main(){
cout<<average(1,5,7,4,10);
return 0;
}