Programing Puzzles
JAnderson
ask at me.com
Sat Aug 9 00:13:31 PDT 2008
BCS wrote:
> Reply to Benjamin,
>
>> Reply to janderson,
>>
>>> What are you trying to say? I imagine your validating Koroskin
>>> solution.
>>>
>>> 10000000 == byte.min
>>> 01111111 == byte.min - 1
>>> =
>>> 00000000 == is power of 2
>>> -Joel
>> byte.min < 0, all powers of 2 are gratter than zero
>>
>
> OTOH my solution fails in the same case :(
>
>
ic, I was thinking unsigned byte. Pretty easy to test for if you need
to use unsigned numbers in that range.
-Joel
More information about the Digitalmars-d-learn
mailing list