Computer Science A - ScoreDistribution - 9/16/99 void ScoreDistribution(ifstream& infile, Score& class) { int grade, lcv; class.totalscores = 0; for(lcv = 0; lcv < class.frequency.length(); lcv++) class.frequency[lcv] = 0; while(!infile.eof()) { infile>>grade; if(grade > 89) class.frequency[0]++; else if(grade > 79) class.frequency[1]++; else if(grade > 69) class.frequency[2]++; else class.frequency[3]++; class.totalScores++; } } Another While Loop while(infile>>grade) { lcv = (grade / 10 - 9) * -1 class.frequency[lcv]++; class.totalScores++; }