Ok, I am having trouble getting this loop to continue. It just asks once and that's it. Here is my code:
// ----------------------------------------------------------
// ExamScores.java (Application)
//
// Author:
// Entered by: -- --
// Classes: ExamScores (list all the class files related to this problem)
// Date: September 22, 2008
// Description: Creating a loop to receive input of grades and outputing the subsequent letter grade
// Bugs: No known bugs.
// ----------------------------------------------------------
import java.util.*;
public class ExamScores
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
int gradeCounter;
int A=0;
int B=0;
int C=0;
int D=0;
int F=0;
double grade =0;
gradeCounter = 0;
System.out.print("Enter an exam score (to quit enter a negative score): ");
grade = input.nextDouble();
while (grade !=-1);
{
System.out.println("Enter an exam score (to quit enter a negative score): ");
grade = input.nextDouble();
if(grade >=90)
A++;
else
if(grade >=80)
B++;
else
if(grade >=70)
C++;
else
if(grade >=60)
D++;
else
F++;
gradeCounter = gradeCounter + 1;
grade++;
}// end of while loop
System.out.println("A: " + A +"\nB: " + B + "\nC: " + C + "\nD: " + D + "\nF: " + F );
}
}