Can someone give me a starting point on how to achieve this?

I'm thinking something like this structure, but I'm not too sure. Any Ideas?:

Code:`public double findAvg(int[] input){`

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

return findAvg(?)

}

}

Printable View

- 06-21-2011, 03:20 AMfam2315Recursively find average of an integer arrray
Can someone give me a starting point on how to achieve this?

I'm thinking something like this structure, but I'm not too sure. Any Ideas?:

Code:`public double findAvg(int[] input){`

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

return findAvg(?)

}

}

- 06-21-2011, 03:25 AMsunde887
This post may be of use to you - http://www.java-forums.org/blogs/sun...recursion.html

Are there any special requirements to this assignment? It would be simply if you created two recursive methods, one to sum an array, and one to count an array(which are both examples in that blog post), and a final method which uses both of those recursive methods to compute the average.