Check Leap Year in C++


//Write a program to check whether the year is leap or not
#include <iostream.h>
#include <conio.h>
void main ()
{
int y;
clrscr ();
cout <<"Enter Year: ";
cin >>y;
if (y%4==0)
{
cout <<"Year is Leap";
}
else
{
cout <<"Year is not Leap";
}
getch ();
}

Labels