This is my code, I am new to java so bear with me. I have to make a program that reads in exam scores and outputs, number of A's, B's...etc. and percentages relatively. I am using a while loop but it is not reading the first score. I input 90 90 90 90 90 60 60 60 60 60 -1(sentinel value) and it outputs that there are 4 A's, and 5 D's. Help!
The first time you call nextInt() (right before your while loop), you're reading your first number in. Then before you do anything with that value, within the body of the while loop you are calling nextInt() again.