Game Preview

Introduction to Java Programming - Activity#2

  •  English    10     Public
    Write and evaluate arithmetic expressions that include variables and operators and compute its value based on the way variables and operators are sequenced in a code segment
  •   Study   Slideshow
  • What is the expected output of the following expression? 4 + 6 * 2
    16
  •  10
  • What is the expected output of the following expression? 10 / 5 + 8
    10
  •  10
  • What is the expected output of the following expression? 12 / 4 + 16 / 2
    11
  •  10
  • What is the expected output of the following expression? 17 / 2
    8
  •  10
  • What is the expected output of the following expression? 22 / 5
    4
  •  10
  • What is the expected output of the following expression? 39 / 10
    3
  •  10
  • What is the expected output of the following expression? 19 % (2 + 3)
    4
  •  20
  • What is the expected output of the following expression? 3 + 4 * 20 / 3
    29
  •  10
  • What is the expected output of the following expression? 36 % (6 + 2)
    4
  •  20
  • What is the expected output of the following code segment? int a=3; System.out.println(a++*3);
    9
  •  20