Interpreting the user input

If the user enters a -1 at this point, the body of the while loop that follows in Listing 4 will be bypassed, and the program will silently terminate without doing anything useful.

If the user enters the first grade at this point, it is saved in the double variable named temp that is declared and initialized in Listing 3.