you are given an array of scores. if the average of those scores are less than a 6.0, then you continue to add 8 to the average until it becomes 6.

here is mycode so far:

public int averageThat(int[] scores) { int summ=0; int count=0; int yohowmany = scores.length; for (int i : scores) { summ= summ + scores [i]; } double average = summ / yohowmany; if (average >= 6.0) { return count; } while (average < 6.0) { average= average +8; average= average / (yohowmany + 1); count ++; } return count; } }

and for some reason, my counter isn't giving me the correct answers. help?

This post has been edited by **Shutterbug84**: 08 March 2010 - 12:07 AM