How would you write a recursive function that calculates the average of the elements of an array?

Here's what I have so far:

```
int media(int numeros[], int i, int n) {
    if (i == n-1) return numeros[i]/n;  
    return numeros[i]/n + media(numeros, i + 1, n); 
}

```

But it doesn't work, and I think it's because of the line: `if (i == n-1) return numeros[i]/n;`