leap year that year whose divide by 4 and not divide 100 else
//===============divide
by 400------------like 2000,2004--------
#include<stdio.h>
#include<conio.h>
void main()
{
int y;
clrscr();
printf(" ENTER THE YEAR ::");
scanf("%d",&y);
if((y%4==0 && y%100!=0)||(y%4000))
printf(" LEAP YEAR ");
else
printf(" not leap year");
getch();
}
No comments:
Post a Comment