Whole numbers, such as 1, 2, 0, –1, –194, and so on, are known as integers. We have already used these as the row and column indexes for our tile patterns and also to define shades of gray. In this chapter, we will be seeing how to combine integers using the familiar arithmetical operators, plus some that you might not have seen before.
5.1 Addition, Subtraction, and Multiplication
To add two integer values together in Kotlin, we use the + operator, and subtraction uses - . The asterisk, * , is used for multiplication.