//WAP To Check Whether The Given Year Is Leap Year or Not.
#include
#include
void main()
{
int year;
clrscr();
printf("ENTER THE YEAR=");
scanf("%d",&year);
if((year%100)==0)
{ if((year%4)==0)
printf("ENTERED YEAR IS A LEAP YEAR");
else
printf("ENTERED YEAR IS NOT A LEAP YEAR");
}
else
{
if((year%4)==0)
printf("ENTERED YEAR IS A LEAP YEAR");
else
printf("ENTERED YEAR IS NOT A LEAP YEAR");
}
getch();
}
No comments:
Post a Comment