/** Find average of an array of integers
 *  Tue Feb 28 2006
 */
public class AverageLoop
{
  public static void main(String[] args)
  {
    int totalCans = 0;
    int[] cansSold = {185, 92, 370, 485, 209,
                      128, 84, 151, 32, 563};
    
    for (int i = 0; i < cansSold.length; i++)
    {
      totalCans = totalCans + cansSold[i];
    }
    System.out.println("We've sold on average " + (totalCans/cansSold.length)
                       + " cans of pop");
    
  }
}

