#include
#include
#include
#include
#include
using namespace std;
double geometricMean(const vector& nums)
{
double mult = accumulate(nums.begin(), nums.end(), 1,multiplies());
return (pow(mult, 1.0 / nums.size()));
}
int main(int argc, char** argv)
{
plus myPlus;
int res = myPlus(4, 5);
cout << res << endl;
vector myVector;
int num;
while (true) {
cout << "Enter a test score to add (0 to stop): ";
cin >> num;
if (num == 0) {
break;
}
myVector.push_back(num);
}
cout << "The geometric mean is " << geometricMean(myVector) << endl;
return (0);
}