What is the output after running the following code snippet? int number = 600; if (number < 200) { System.out.println("Low spender"); } else if (number < 500) { System.out.println("Spending in moderation"); } else if (number < 1000) { System.out.println("Above average!"); } else { System.out.println("High Roller!"); }

Respuesta :

ijeggs

Answer:

Above average!

Explanation:

The code snippet is testing different values of the integer variable number.

If number is less than 200 It prints Low Spender

else If number is more than 200 but less than 500 It prints Spending in moderation

else if number is more than 500 but less than 100 It prints Above Average!

In the code snippet given, number is set to 600 So it prints Above Average!

ACCESS MORE