I need to print out the scores and the grades when entered and i do not know how to print the scanner. im sure i am probably missing other things as well.
import java.util.Scanner;
public class Scores
{
public static void main(String[] args)
{
int count;
int score;
int total;
Scanner input = new Scanner ( System.in );
count =0;
total =0;
score = input.nextInt();
while (score != -1)
{
count++;
total = total+ score;
score = input.nextInt();
}
System.out.printf("%s%d%s\n", "There are ",count, " student(s) in the class");
System.out.printf("%s%d%s\n", "The total of their scores = ",total, " points");
System.out.println(count);
System.out.println(total);
System.out.print("Enter Score ==>");
score=input.nextInt();
count++;
{
if (score >= 90)
System.out.print("A");
else
if (score >=80)
System.out.print("B");
else
if (score >= 70)
System.out.print("C");
else
if (score >=60)
System.out.print("D");
else
if (score >= 59)
System.out.print("F");
System.out.print("score");
}
}
}