/* Filename : leap.h * Function Name: leapf * Written By : Prof. Kantila [kantila@gmail.com] * Purpose : defines a function to check the given year for leap year * Arguments : int type - year number * Return value : int 1 - If given year is leap year, 0 - if not */
int leapf(int yr) { if(yr%400==0) return 1; else if(yr%4==0 && yr%100!=0) return 1; else return 0; }
|