Check if an Octal number is Even or Odd | C # code to check if a Octal number is Even or Odd ; Check if the number is odd or even ; Check if the last digit is either '0' , '2' , '4' , or '6' ; Driver code
using System ; public class GFG { static String even_or_odd ( String N ) { int len = N . Length ; if ( N [ len - 1 ] == '0' N [ len - 1 ] == '2' N [ len - 1 ] == '4' N [ len - 1 ] == '6' ) return ( " Even " ) ; else return ( " Odd " ) ; } public static void Main ( String [ ] args ) { String N = "735" ; Console . Write ( even_or_odd ( N ) ) ; } }