Monday, January 4, 2010

Program to find that entered year is leap year or not.

#include
#include

void main()
{
int n;
clrscr();
printf("enter any year: ");
scanf("%d",&n);
if(n%4==0)
printf("year is a leap year");
else
printf("year is not a leap year");
getch();
}


Output:
enter any year: 1947
year is not a leap year
 

No comments:

Post a Comment