program is functional, but for only one user entry. I can't figure out why its not looping properly. Does anyone see anything that I am not seeing? Any and all help is greatly appreciated.
import java.util.Scanner; public class GradeGrouper { public static void main (String [] args) { int score; char grade; int countA; int countB; int countC; int countD; int countF; System.out.println ("The program will tally the number of Letter Grades, as well as"); System.out.println (" the total quantity of grades entered."); System.out.println ("Enter a series of non-negative integers to be compiled."); System.out.println ("Enter a negative number when complete."); Scanner keyboard = new Scanner (System.in); score = keyboard.nextInt (); do { countA = 0; countB = 0; countC = 0; countD = 0; countF = 0; if (score >= 90) {grade = 'A'; countA++;} else if (score >= 80) {grade = 'B'; countB++;} else if (score >= 70) {grade = 'C'; countC++;} else if (score >= 60) {grade = 'D'; countD++;} else {grade = 'F'; countF++;} } while (score <= 0); System.out.println ("The total quantity of integers entered is "); System.out.println (+ (countA + countB + countC + countD + countF)); System.out.println ("The number of A's entered is " + countA); System.out.println ("The number of B's entered is " + countB); System.out.println ("The number of C's entered is " + countC); System.out.println ("The number of D's entered is " + countD); System.out.println ("The number of F's entered is " + countF); } }