Program to check the given year is leap year or not

Easy learn c program in language
[There are some steps to find the given year is leap year or not]
we also find the leap year by this pattern
if n%4=0, then the given year is leap year.
solution:-
#include<stdio.h> 
#include<conio.h>
void main()
{
int year;
clrscr();
printf("Enter the year\n);
scanf("%d",&year);
if(year%4==0)
{
printf("Leap year");
}
else
{
printf(Not leap year);
}
getch();
}
output is:-
Enter the year
2016
Leap year

Comments