In this lesson, students will learn how to use the increment operator (++
), the decrement operator (--
) and compound assignment operators (+=
, −=
, *=
, /=
, %=
). The increment operator (++
) and decrement operator (−−
) are used to add 1 or subtract 1 from the stored value of a variable. The new value is assigned to the variable. This lesson corresponds with AP Computer Science A topic 1.4.
Students will be able to:
+=
, −=
, *=
, /=
, %=
) in place of the assignment operator++
) or decrement operator (−−
) to add 1 or subtract 1 from the stored value of a variableThese are all the activities included in the lesson