Even Or Odd?

Console.Write("Please input a number:");
int num=Convert.ToInt32(Console.ReadLine());
Console.WriteLine();
Console.WriteLine((num & 1)==0?"The number is even":"The number is odd");
Console.ReadLine();

你可能感兴趣的:(or)