This preview shows page 1. Sign up to view the full content.
Unformatted text preview: d //keeps a count of scores to find numbers of below and above average int numOfAbove = 0; int numOfBelow = 0; for (int i = 0; i < count - 1; i++) if (scores[i] >= average) numOfAbove++; //counter for number above average else numOfBelow++; //counter for number below average n System.out.println("Average is " + average); //displays desired information to user System.out.println("Number of scores above or equal to the average " + numOfAbove); System.out.println("Number of scores below the average " + numOfBelow); + System.exit(0); //exits the program } }...
View Full Document
This note was uploaded on 07/26/2011 for the course IT 218 taught by Professor Accampo,e during the Spring '11 term at ITT Tech Pittsburgh.
- Spring '11