Examlex

Solved

What Is the Output of the Following Code Snippet

question 18

Multiple Choice

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) ;


Definitions:

Related Questions