number of digits

num-digits: whole-number -> number

Returns how many digits in the number.


number of digits


number of digits

(define (num-digits n)
  (cond [(< n 10) 1]
        [else ... ]))

number of digits


number of digits

Trick: