What is the output of the following code snippet?
Int num = 100;
If (num < 100)
{
If (num < 50)
{
Num = num - 5;
}
Else
{
Num = num - 10;
}
}
Else
{
If (num > 150)
{
Num = num + 5;
}
Else
{
Num = num + 10;
}
}
System.out.println(num) ;
A) 95
B) 100
C) 105
D) 110
Correct Answer:
Verified
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
Q63: Which of the following options correctly represents
Q64: Consider the following code snippet:
Int score =
Q65: Assuming that a valid price should be
Q66: Assuming that a user enters 45, 78,
Q67: Which of the following coding techniques can
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