When I went to elementary school, which as far as my kids are concerned was when dinosaurs roamed the earth, I had to perform arithmetic calculations by hand or in my head. There were no calculators , only slide rules. (Warning: You may date yourself by even admitting you know what a slide rule is!)
When it was my kids turn to go to school, and I d ask them to perform an arithmetic calculation while going over their homework or tests, they would whip out a calculator. When I asked them to perform the calculation by hand or in their head, they would look at me with mixed amazement and pity and exclaim Aw, Dad, no one does it that way anymore.
Maybe my kids were right. When I write computer programs, I don t do it that way anymore either. I let the fastest , most accurate calculator I own do the work: my computer.
Many computer programs need to perform calculations. Computers, in addition to being able to store vast amounts of data, also can calculate far more quickly and accurately than we can. Thus, you use arithmetic operators to harness your computer s calculating ability, something which we will explore in this chapter.