Hi I am trying to figure out why this code is not working! I have spent about 2 or 3 hours trying to figure it out and after numerous amount of research I still can't figure it out please help!!! Thank you so much for any help provided!
package edu.umsl.mis3806;
import java.io.*;
import edu.umsl.mis3806.KbdInput;
import java.util.*;
public class Grades
{
public static void main(
String [] args) throws IOException
{
System.out.println("Please enter grades or -99 to quit:");
BufferedReader br;
br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
StringTokenizer st= new StringTokenizer(line);
int input, sumA, sumB, sumC, sumD, sumF;
sumA=sumB=sumC=sumD=sumF=0;
//String s = st.nextToken();
KbdInput kbd = new KbdInput();
input = KbdInput.readInt();
while (st.hasMoreTokens())
{
if(input==-99) System.exit(1);
while(input != -99)
{
if(input>=90){
sumA++;
System.out.println(new Integer(input) + " A");
}
else if(input >= 70){
sumB++;
System.out.println(new Integer(input) + " B");
}
else if(input >= 50){
sumC++;
System.out.println(new Integer(input) + " C");
}
else if(input >= 35){
sumD++;
System.out.println(new Integer(input) + " D");
}
else{
sumF++;
System.out.println(new Integer(input) + " F");
}
input = KbdInput.readInt();
}
// System.out.println(st.nextToken());
System.out.println("The total number of A's is " + new Integer(sumA ));
System.out.println("The total number of B's is " + new Integer(sumB ));
System.out.println("The total number of C's is " + new Integer(sumC ));
System.out.println("The total number of D's is " + new Integer(sumD ));
System.out.println("The total number of F's is " + new Integer(sumF ));
}
}
}