Check Leap Year


Write a C program to check leap year.

						
#include <stdio.h>
#include <conio.h>

void main ()
{
	int year;
	printf("Enter a Year to check whether it is leap year or not \n");
	scanf("%d",&year);

	if(year%400 == 0 || (year%100!==0 && year%4==0)){
		printf("Entered year is leap year");
	}
	else{
		printf("Entered year is not leap year");
	}
}

									

Output :

Output