Write a function s(a, n), where a is a one-dimensional integer array and n is the length of the array, and find the average value in the array through the pointer.
Double s(int* a, int n)
{
int i,avg = 0;
for(I = 0; I & ltn;; i++)
avg+= a[I];
return(double)avg/(n * 1.0);
}