public char[] calculateGrade(int [] scores, char [] grades){
for (int r = 0; r < scores.length; r++){
//System.out.println(scores[r] + " ");
if (scores[r] > 90)
grades[r] = 'A';
else if (scores[r] > 80)
grades[r] = 'B';
else if (scores[r] > 70)
grades[r] = 'C';
else if (scores[r] > 60)
grades[r] = 'D';
else
grades[r] = 'F';
for (int i = 0; i < grades.length; i++)
System.out.println(grades[i]);
}
return grades;
}
Above is a small part of my overall program that takes scores from a file and turns them into letter grades. I need to put these letter grades into that file. The letter grade needs to correspond with the score. There are 26 different scores one line at a time. I would put my entire code in here but it is really long. Please help guys!