Code:

int isum (int iarr[], int num)
{
int i, sum;
for (i=0, sum=0; i < num; i++) total += iarr[i];
return sum;
}
int dsum (double darr[], double num,)
{
double d, sum;
for (d=0, sum=0; d < num; d++) total += darr[d];
return sum;
}
int iaverage (int iarr[], int num)
{
int i, sum, avg;
for (i=0, sum=0, avg=0; i < num; i++) total += iarr[i];
avg = total/i;
return avg;
}
int daverage (double darr[], double num)
{
double d, sum, avg;
for (d=0, sum=0, avg=0; d < num; d++) total += darr[d];
avg = total/d;
return total;
}

Ok, here are my other functions so far. I'm having a little problem with my imax, though.

Code:

int imax (int darr[], int num)
{
int i, max;
for (max = -36667, i = 0; i < num; i++)
{
if (/*what would go here?*/ > max)
max = /*what would go there?*/;
}
return max;
}

What would I put where my comments are?

Also, since I can't compile a header file, does anyone see any horrible errors with my other functions?