the purpose of my program is to ask the user for their numerical grades (depending on how many total grades they have) and then they are given their letter grade. but i cant get the for loop to loop the question according to their number of total grades
import TerminalIO.*;
public class LetterGradeWLT {
public static void main(String [] args){
KeyboardReader reader = new KeyboardReader();
int grades;
int grade;
String lettergrade;
grades = reader.readInt("Enter total number of grades: ");
for ( grades = 1; grades >= 1; grades++) {
grade = reader.readInt("Enter your numeric grade: ");
if (grade >= 96)
System.out.println(" Your letter grade is A+.");
if ( 92 <= grade && grade <= 95)
System.out.println(" Your letter grade is A.");
if ( 90 <= grade && grade <= 91)
System.out.println(" Your letter grade is A-.");
if ( 86 <= grade && grade <= 89)
System.out.println(" Your letter grade is B+.");
if ( 82 <= grade && grade <= 85)
System.out.println(" Your letter grade is B.");
if ( 80 <= grade && grade <= 81)
System.out.println(" Your letter grade is B-.");
if ( 76 <= grade && grade <= 79)
System.out.println(" Your letter grade is C+.");
if ( 72 <= grade && grade <= 75)
System.out.println(" Your letter grade is C.");
if ( 70 <= grade && grade <= 71)
System.out.println(" Your letter grade is C-.");
if ( 66 <= grade && grade <= 69)
System.out.println(" Your letter grade is D+.");
if ( 62 <= grade && grade <= 65)
System.out.println(" Your letter grade is D.");
if ( 60 <= grade && grade <= 61)
System.out.println(" Your letter grade is D-.");
if ( -1 < grade && grade <= 59)
System.out.println(" Your letter grade is F.");
}
}
}