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);
}
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);
}
Sir please put topics covered today..
ReplyDelete