C Program to find a given year is Leap or Not !
#include<stdio.h>
#include<conio.h>
main()
{
int y;
printf("enter any year...");
scanf("%d",&y);
if(y%100==0)
{
if(y%400==0)
printf("%d is a leap year",y);
else
printf("%d is not a leap year,y");
}
else
{
if(y%4==0)
printf("%d is a leap year",y);
else
printf("%d is not a leap year"
,y);
}
}
Output :-
enter any year...2014
2014 is not a leap year
0 Comments
Tell us your queries or more topics which you want