Assuming that a user enters 64 as his score, what is the output of the following code snippet?
Int score = 0;
Scanner in = new Scanner(System.in) ;
System.out.print("Enter your score: ") ;
Score = in.nextInt() ;
If (score < 40)
{
System.out.println("F") ;
}
Else if (score >= 40 || score < 50)
{
System.out.println("D") ;
}
Else if (score >= 50 || score < 60)
{
System.out.println("C") ;
}
Else if (score >= 60 || score < 70)
{
System.out.println("B") ;
}
Else if (score >= 70 || score < 80)
{
System.out.println("B+") ;
}
Else
{
System.out.println("A") ;
}
A) D
B) C
C) B
D) A
Correct Answer:
Verified
Q24: Which of the following operators is NOT
Q54: Which of the following expressions represents a
Q55: What is the value of the price
Q57: Consider the following code snippet: boolean attendance
Q58: Consider the following code snippet. Assuming that
Q59: Assuming that a user enters 56 for
Q61: A store applies a 15 percent service
Q86: When testing code for correctness, it always
Q90: Which of the following expressions represents a
Q93: Which of the following variables is used
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents