Question: Assume that you are writing a program which asks the user for a grade. You want this program to prevent the user from entering any
Assume that you are writing a program which asks the user for a grade. You want this program to prevent the user from entering any grades that are outside the range of You are using the following program segment to query the user until a single proper grade is entered.
int grade input.nextInt;
while
System.out.printThat is invalid. Enter a grade: ; grade input.nextInt;
Which of the following conditions can be put in place of the in the while loop to accomplish the desired task?
I. gradegrade
IIgrade grade
III. grade && grade
A I only
B I and II only
C II and III only
D I and III only
E I, II and III
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
