The five arithmetic assignment operators are a form of short hand. Various textbooks call them "compound assignment operators" or "combined assignment operators". Their usage can be explaned in terms of the assignment operator and the arithmetic operators. In the table we will use the variable age and you can assume that it is of integer data type.
| Arithmetic assignment examples: | Equivalent code: |
age += 14;
|
age = age + 14;
|
age -= 14;
|
age = age - 14;
|
age *= 14;
|
age = age * 14;
|
age /= 14;
|
age = age / 14;
|
age %= 14;
|
age = age % 14;
|







Assignment Operator
Arithmetic Operators
Bloodshed Dev-C++ 5 Compiler/IDE

"Used in the Computer Programming Fundamentals I course."