You apply operators to integer variables to change a value or evaluate an expression for other use. The operators that apply to integers are described here in several related categories. Those not discussed in this section are covered in Chapter 5, "Using Expressions," and Chapter 6.

Arithmetic operators are used to perform standard mathematical operations on variables. These operators include:

+ | Addition operator |

– | Subtraction operator |

* | Multiplication operator |

/ | Division operator |

% | Remainder operator (gives the remainder of a division) |

The only operator in this list that you might not be familiar with is the remainder operator. The remainder of an operation is the remainder of the divisor divided by the dividend. ...

Start Free Trial

No credit card required