solution

#include<iostream.h>
#include<conio.h>

int main()
{
 int year;

 cout<<"Enter the year : ";
 cin>>year;

 if( (year%400==0 || year%100!=0) &&(year%4==0))
  cout<<"It is a leap year";
 else
  cout<<"It is not a leap year";

 getch();
 return 0;
}

Post a Comment

Previous Post Next Post