Program for Leap year

#include<stdio.h>'
void main()
{
int year;
printf("\nEnter the year:");
scanf("%d",&year);
if(year%4==0)
{
if(year%100==0)
{
if(year%400==0)
printf("\n Year %d is a Leap year",year);
else
printf("\n Year %d is Not a Leap year",year);
}
else
printf("\n Year %d is a Leap year",year);
}
else
printf("\n Year %d is Not a Leap year",year);
}

Comments

Post a Comment

Popular posts from this blog

कंप्यूटर की पीढ़ियाँ (Generation of Computer)

Prime Number with break