| Contact PSVM (Q & A) | Notes Below Audio | [toc] [prev] Slide 8 of 13 [next] |
|
|
| 1, 2, 3, 4, 5, 6, 7, [8 (top)], 9, 10, 11, 12, 13, [Lab] |
|
Notes for Slide 08 This slide shows three more arithmetic operators for ints. The addition-operator: + :and the multiplication-operator: * :and the division-operator: / :are all placed between two ints and produce a result that is also an int. Note that the division of two ints is tricky because the resulting int might not be what you were expecting. Later we will explain how to get exact results from dividing two numbers. For now, be reminded that int values do not contain decimal points. The example on the bottom shows four set-statements and the resulting int value placed in the total, dollars and cents variables given the values shown for the donutPrice and hotDogPrice variables. 1, 2, 3, 4, 5, 6, 7, [8 (top)], 9, 10, 11, 12, 13, [Lab] |