• worldeye
  • Category Uncategorized
/*PROGRAM TO FIND WHETHER A GIVEN YEAR IS LEAP YEAR OR NOT.*/

#include 
#include 
void main()
{
int year,leap;
clrscr();
printf("enter the year:- ");
scanf("%d",&year);
if ((year%100)==0)
leap=(year/400)*400;
else
leap=(year/4)*4;
if (leap==year)
printf("%d is a leap year.",year);
else
printf("%d is not a leap year.",year);
getch();
}

Leave a Reply

Your email address will not be published. Required fields are marked *