PROGRAM ON LEAP YEAR

#include<iostream.h>
#include<conio.h>
void main()
{
   int year;
   clrscr();
   cout<<"Enter the year\n";
   cin>>year;
   if(year%100==0)
   {
     if(year%400==0)
     cout<<"Leap year\n";
   }
   else if(year%4==0)
   cout<<"Leap year\n";
   else
   cout<<"Not a leap year\n";
   getch();
}

Comments

Popular Posts