Test: Computer Science

Consider the following code:

int a = 14;

int b = -15;

int c = 22;

int d = 11;

if(a > 12 && b < -14 && c < d) {

        System.out.println("YAY!!!!");

} else if (d - 20 < b) {

        System.out.println("GO DO MORE PROGRAMMING!");

} else if(a + 12 >= c) {

        System.out.println("This is vexing......");

} else {

        System.out.println("This is very fun!");

}}

1.

What is the output for the code above?

YAY!!!!

GO DO MORE PROGRAMMING!

This is very fun!

This is vexing......

No output appears.

1/3 questions

0%

Access results and powerful study features!

Take 15 seconds to create an account.
Start now! Create your free account and get access to features like:
  • Full length diagnostic tests
  • Invite your friends
  • Access hundreds of practice tests
  • Monitor your progress over time
  • Manage your tests and results
  • Monitor the progress of your class & students
By clicking Create Account you agree that you are at least 13 years old and you agree to the Varsity Tutors LLC Terms of Use and Privacy Policy.
Learning Tools by Varsity Tutors