using System;
class IsOdd {
public static void Main() {
ushort num;
num = 10;
if((num &1)==1)
Console.WriteLine(" This won't display.");
num = 11;
if((num & 1) == 1)
Console.WriteLine( num + " is odd.");
}
}
Friday, September 5, 2008
C# Program-Use bitwise AND to determine if a number is odd.
Posted by Nanya at 6:55 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment