#include <iostream>

using namespace std;
double getavg(int *pt,int size);

int main()
{
int mat[3]={1000,10,677};

double avg;

avg=getavg(mat,3);

cout<<"the average of mat is "<<avg<<endl;
}



double getavg(int *pt,int size)
{
double sum;
double avg;

for (int i=0;i<size;i++)
{

sum=sum+pt[i];
}
avg=sum/size;
return avg;

}
the average of mat is 562.333