public class Test01 {
	public static void main(String[] args){
		int[] a = {15,16,17,18,19,20,21,22};
		int hap = 0;
		float avg;
		for (int i : a)
			hap = hap + i;
		avg = (float)hap / a.length;
		System.out.printf("%4d, %6.2f", hap, avg);
	}
}
