
Help with Java code
I'm working on a program, and I'm stuck. I need to calculate the sum, average, largest and smallest elements of an array. I am supposed to use a for loop to test if the number is between 90 and 100, If number is in this range, I should add 1 to the Talley of grade A. This is to be done for grades B,C,D. My question is how do I display a list of how many students had A's, B's etc.
Any help would be appreciated

It tells you what to do in the assignment. How you want to do it is up to you. For example you can have an it variable for each letter grade. What have you tried so far? Post some code(wrap it in code tags)

You would have 5 variables for each grade, then add one to the appropriate variable for the respective grade.
Code:
int gradeA = 0, gradeB = 0, gradeC = 0, gradeD = 0, gradeE = 0;
for(int grade : grades) {
if(grade >= 90) gradeA++;
else if(grade >= 80) gradeB++;
else if(grade >= 74) gradeC++;
else if(grade >= 70) gradeD++;
else gradeF++;
}