Check whether a given number is even or odd | C # program program to check for even or odd ; Returns true if n is even , else odd ; Driver code
using System ; class GFG { public static bool isEven ( int n ) { return ( n % 2 == 0 ) ; } public static void Main ( ) { int n = 101 ; if ( isEven ( n ) == true ) Console . WriteLine ( " Even " ) ; else Console . WriteLine ( " Odd " ) ; } }