Programming Resource
  leap.h
 
/* 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;
}
 
 
  Today, there have been 3 visitors (3 hits) on this page!  
 
This website was created for free with Own-Free-Website.com. Would you also like to have your own website?
Sign up for free