{ //remove
System.out.println();
System.out.println("Enter all of the exam scores.");
sum=0;
int NumberOfA = 0;
int NumberOfB = 0;
int NumberOfC = 0;
int NumberOfD = 0;
int NumberOfF = 0;
next = keyboard.nextInt();
score = keyboard.nextInt();
grade = keyboard.next();
}//remove
Remove the curly braces which are indicated above and your problem will be solved.
these curly braces are making your veriables local so they are not accessible out side the curly braces.
for further support visit
http://www.braindumpindia.com