Program:
#include<stdio.h>
int main()
{
int year;
printf("Enter a Year : ");
scanf("%d",&year);
if(year%4==0)
{
if(year%100==0)
{
if(year%400==0)
{
printf("%d is a Leap Year",year);
}
else
{
printf("%d is a Not a Leap Year",year);
}
}
else
{
printf("%d is
a Leap Year",year);
}
}
else
{
printf("%d is Not a Leap
Year",year);
}
getch();
return 0;
}
Output:
Thank You ...
0 comments: