/*Write a C++ program to determine whether the year is a leap year */
#include<iostream.h>
#include<conio.h>
void main( )
{
int year ;
clrscr( );
cout<<"Enter the Year: ";
cin>>year;
if(year%4 ==0 && year%100!=0 || year%400 ==0)
cout<<"it is a leap year";
else
cout<<"it is not a leap year";
getch( );
}

No comments: