Ch 04 Notes
- (Memorize) The rightmost digits of a whole number come from
remainder (
rem
). - (Memorize) Remove the rightmost digits of a whole number with
div
. - (Memorize) Testing for divisibility: is the remainder zero?
- Dividing integers is usually bad. Avoid it by multiplying.
- Is this fraction an integer? Do not divide. See above.
- Do not use
read
unless you have to. (If the number does not start out as aString
, thenread
is not necesary.)