leap year in c

include stdio.h
int main(void)
{
int n;
printf("enter year (like this 2005) :");
scanf("%d",&n);
if(n%4==0 && n%100 !=0 || n%400==0)
printf("%d is leap year \n",n);
else
printf("%d is not leap year\n ",n);
return 0;
}

No comments:

Post a Comment

There was an error in this gadget

Followers

About Me

Dhaka, Dhaka, Bangladesh
..