Interactive Assignment: If-Else Control Flow Statements

profilemrsseetnacyexander

Provide the definition of an If-Else statement. Identify when you would you use an If-Else statement in programming. 

Consider the Java code below:

if (x > 5)
  {
    System.out.println("A");
    if (x < 10)
    System.out.println("B");
  }
else
System.out.println("C");

What is displayed if x is:

  1. 4;
  2. 5;
  3. 6;
  4. 9;
  5. 10;
  6. 11
    • 7 years ago
    • 5
    Answer(1)

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      mrssee_programming.docx