C Program to Check Year is a Leap Year or Not
#include<stdio.h>
int main ()
{
int year;
scanf("%d",&year);
if(year % 400 == 0)
printf("%d is a Leap Year",year);
else if(year % 4 == 0 && year % 100 != 0)
printf("%d is a Leap Year",year);
else
printf("%d is not a Leap Year",year);
return 0;
}
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home