// if even then return 1 else return 0

Code:
int even_odd ( int num) 
{
        if (num & 1) 
            return 0;
        return 1;
}

Last edited by shabbir; 10Aug2007 at 13:06.. Reason: Code block