25 Oct
2002
25 Oct
'02
14:06
On Friday 25 October 2002 11:47, Oli Weiss wrote:
hat einer ne Idee wie ich in C feststellen kann, ob es sich bei einer Zahl (int) um eine gerade oder ungerade Zahl handelt und ich den Modulo-Operator nicht verwenden darf - und keine sonstigen Funktionen o.ä. ?
odd = zahl & 0x1; Eine ungerade Zahl hat das least significant bit gesetzt. HTH, Vinzent. -- I can't understand it. I can't even understand the people who can understand it. -- Queen Juliana of the Netherlands.