• @[email protected]
        link
        fedilink
        22 years ago

        Yeah that should be last bit, not last digit lol.

        For another convoluted impl you could do some kind of string format print into a string. Then do your if/else comparing that string containing the last digit. Maybe create a hash set collection of all single digit even strings, then you’ve got O(1) performance using a contains() method.