using System; public class Program { public static void Main(String[] args) { Console.WriteLine( NumberUtils.IsOdd(0) ); // false Console.WriteLine( NumberUtils.IsOdd(1) ); // true // odd Console.WriteLine( NumberUtils.IsOdd(2) ); // false Console.WriteLine( NumberUtils.IsOdd(3) ); // true // odd Console.WriteLine( NumberUtils.IsOdd(4) ); // false Console.WriteLine( NumberUtils.IsOdd(5) ); // true // odd Console.WriteLine( NumberUtils.IsOdd(-1) ); // true // odd Console.WriteLine( NumberUtils.IsOdd(-2) ); // false Console.WriteLine( NumberUtils.IsOdd(-3) ); // true // odd Console.WriteLine( NumberUtils.IsOdd(-4) ); // false Console.WriteLine( NumberUtils.IsOdd(-5) ); // true // odd } } public class NumberUtils { public static bool IsOdd(int number) { return number % 2 != 0; } }