Given the following psuedocode, what value of GRADENUM can be input to output a grade of "B"?

Start
Read GRADENUM
CASENTRY GRADENUM
CASE 90 <= GRADENUM <= 100
GRADE = "A"
CASE 80 <= GRADENUM <= 90
GRADE = "B"
CASE 70 <= GRADENUM <= 80
GRADE = "C"
CASE 60 <= GRADENUM <= 70
GRADE = "D"
CASE other
GRADE = "F"
ENDCASE
Write GRADE
Stop

a. 80
b. 90
c. less than 80
d. greater than 90

The answer is d.

A professor actually gave you that case structure?? Perhaps he needs to read a chapter or two ahead of the class and brush up on his comparison operators.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.