#include <iostream>
#include <windows.h>
#include <string>
using namespace std;
float averageSalary(int n[],int i) {
float sum = 0;
for (int x = 0; x < i; x++) {
sum += n[x];
}return sum/i;
}
int main() {
int salary[] = {
2300,3000,1888,5000,6000,6200
};
cout << averageSalary(salary, 6) << endl;
system("pause");
return 0;
}