import java.util.*;

public class HeaderMethod {
  
  
  public static void main(String[] args) { 
   
    Scanner input = new Scanner(System.in);
    
    System.out.print("How many receipts do you have?");
    int numReceipts = input.nextInt();
    
    int total=0;
    
    for(int i=1; i<=numReceipts; i++) {
      
     System.out.print("Enter receipt #"+i+": ");
     int amount = input.nextInt();
     
     total = total + amount; //total+=amount
      
    }
    double average = (double)total / numReceipts;
    System.out.println("You had "+numReceipts+" customers for a total of $"+total);
    System.out.printf("The average customer receipt was %.2f\n", average);
  }  
}
