Assuming that a user enters 45, 78, and then 12, what is the output of the following code snippet?
Int num1 = 0;
Int num2 = 0;
Int num3 = 0;
Scanner in = new Scanner(System.in) ;
System.out.print("Enter a number: ") ;
Num1 = in.nextInt() ;
System.out.print("Enter a number: ") ;
Num2 = in.nextInt() ;
System.out.print("Enter a number: ") ;
Num3 = in.nextInt() ;
If (!(num1 > num2 && num1 > num3) )
{
System.out.println(num1) ;
}
Else if (!(num2 > num1 && num2 > num3) )
{
System.out.println(num2) ;
}
Else if (!(num3 > num1 && num3 > num2) )
{
System.out.println(num3) ;
}
A) 12
B) 45
C) 78
D) There is no output due to compilation errors.
Correct Answer:
Verified
Q61: A store applies a 15 percent service
Q62: What is the output of the following
Q63: Which of the following options correctly represents
Q64: Consider the following code snippet:
Int score =
Q65: Assuming that a valid price should be
Q67: Which of the following coding techniques can
Q68: Which of the following conditions tests whether
Q69: Assuming that a user enters 22 as
Q83: Which of the following operators compare using
Q109: Which of the following options checks that
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