C-PROGRAM PROGRAM TO CHECK WHETHER ENTERED YEAR IS LEAP YEAR
#include<stdio.h>
void main()
{
int a;
printf("enter the year to be checked");
scanf("%d",&a);
if(a%4==0)
{
if(a%100==0)
{
if(a%400==0)
printf("Leap year");
C tutorial video for beginners
void main()
{
int a;
printf("enter the year to be checked");
scanf("%d",&a);
if(a%4==0)
{
if(a%100==0)
{
if(a%400==0)
printf("Leap year");
else
printf("Not a leap year ");
}
else
printf("Leap year");
}
else
printf("Not a leap year");
}
printf("Not a leap year ");
}
else
printf("Leap year");
}
else
printf("Not a leap year");
}
Comments
Post a Comment