Solved

Assuming That a User Enters 45, 78, and Then 12

Question 66

Multiple Choice

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents